Skip to content

Common Diff Tool Configurations For TFVC

Daniel Schroeder edited this page Nov 6, 2019 · 5 revisions

The original information shown here was taken from James Manning's wonderful blog post. He also shows the arguments to use for many merge tools as well.

Here is a list of common Diff (i.e. Compare) Tools and the default Command and Arguments that should be used with them. See How To Change The Default Visual Studio Diff Tool For TFVC for how to access the window that these settings should be used in.

Product Command Arguments
TFS default (Visual Studio 2015 and lower) diffmerge.exe %1 %2 %6 %7 %5 /ignorespace
TFS default (Visual Studio 2017+) vsdiffmerge.exe %1 %2 %6 %7 %5 /ignorespace
WinDiff windiff.exe %1 %2
DiffDoc (for Word files) DiffDoc.exe /M%1 /S%2
WinMerge winmerge.exe /ub /dl %6 /dr %7 %1 %2
Beyond Compare bc2.exe %1 %2 /title1=%6 /title2=%7
KDiff3 kdiff3.exe %1 --fname %6 %2 --fname %7
Araxis compare.exe /wait /2 /title1:%6 /title2:%7 %1 %2
Compare It! Wincmp3.exe %1 /=%6 %2 /=%7
SourceGear DiffMerge DiffMerge.exe /title1=%6 /title2=%7 %1 %2
Beyond Compare v2 BC2.exe %1 %2 /title1=%6 /title2=%7
Beyond Compare v3 BComp.exe (or BC3.exe) %1 %2 /title1=%6 /title2=%7
Beyond Compare v4 BCompare.exe %1 %2 /title1=%6 /title2=%7
TortoiseMerge TortoiseMerge.exe /base:%1 /mine:%2 /basename:%6 /minename:%7
TortoiseGitMerge TortoiseGitMerge.exe /base:%1 /mine:%2 /basename:%6 /minename:%7
Visual SlickEdit win\vsdiff.exe %1 %2

And here is a legend for what each of the arguments mean:

  • %1 = Original file (in diff, the pre-changes file, in merge, the "server" or "theirs" file, the file that is the base file after "their" changes were applied)
  • %2 = Modified file (in diff, the post-changes file, in merge the "yours" file - the base file with "your" changes applied)
  • %3 = Base file (in the 3-way merge operation, the file which both "theirs" and "yours" are derived from - the common ancestor. This doesn't mean it's the version the changes were based from, since this may be a cherry-pick merge)
  • %4 = Merged file (The output file for the merge operation - the filename that the merge tool should write to)
  • %5 = Diff options (any additional command-line options you want to pass to your diff tool - this comes into play only when using "tf diff /options" from the command-line)
  • %6 = Original file label (The label for the %1 file)
  • %7 = Modified file label (The label for the %2 file)
  • %8 = Base file label (The label for the %3 file)
  • %9 = Merged file label (The label for the %4 file)

VsDiffMerge.exe can be found at a location like C:\Program Files (x86)\Microsoft Visual Studio\2017\WDExpress\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\vsDiffMerge.exe.

Clone this wiki locally