Configure vsdiffmerge for multiple files at once

I am using git 1.9.4 for windows from ( http://git-scm.com/download/win ).

$ git difftool branchA branchB Opens vsdiffmerge one file for all files in diff.

$ git difftool --no-prompt branchA branchB tries to open all files at once (what I want to do), but vsdiffmerge cannot handle this properly with any of the following events.

  • some empty vsdiffmerge instances will open
  • An already open instance will have its open tab replaced with the next file in the differences list

How do I configure my diffftool so that the behavior is a single instance of vsdiffmerge with multiple tabs of all the differences?

gitconfig:

 [diff "astextplain"] textconv = astextplain [rebase] autosquash = true [diff] tool = vsdiffmerge [difftool] prompt = true [difftool "vsdiffmerge"] cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t keepbackup = false trustexistcode = true [merge] tool = vsdiffmerge [mergetool] prompt = true [mergetool "vsdiffmerge"] cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" //m keepbackup = false trustexistcode = true 
+7
git git-diff visual-studio-2012
source share
1 answer

The answer is: delete /t at the end (or //t due to escaping).

The /t argument opens a time tab. This is the tab that is being replaced. Without this argument, Visual Studio opens a persistent tab and adds it to other tabs that are already open.

See also here:
https://roadtoalm.com/2013/10/22/use-visual-studio-as-your-diff-and-merging-tool-for-local-files/

PS: Despite the fact that I deleted /t at the end, for me the differential was still open in the time tab. The reason for this - at least in my case - was that Visual Studio or Git ignored all the settings in the vsdiffmerge tool. After I renamed the tool, everything worked as expected.

Therefore, I suggest renaming the tool to something like vsdiff , remove /t and try again.

Remember to name it as git difftool -t vsdiff --no-prompt branchA branchB to explicitly use the tool named vsdiff or set vsdiff as the default tool.

0
source share

All Articles