I want to use vsdiffmerge as git diff tool. And I set the .git/config
below.
[diff]
tool = vsdiffmerge
[difftool]
prompt = true
[difftool "vsdiffmerge"]
cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\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\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\vsDiffMerge.exe\" \"$LOCAL\" \"$REMOTE\" //t //m
keepbackup = false
trustexistcode = true
I find it can work well some times but it will open a new VisualStudio and not show the diff tab. I try delete the //t
but not help.
I want to ask two question:
How to make the vsdiffmerge open the diff tab in the opening VisualStudio?
How to use git diff multi-file once that I dont want to input all file to y
. I see the number of files is 133 that I should press 133 y
.
The commands for difftool and mergetool should be a little different:
Try this:
Difftool Command: /t "$LOCAL" "$REMOTE"
MergeTool Command: /m /t "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
Here is an example for Visual Studio 2019 but it should be similar for Visual Studion 2017:
difftool.vsdiffmerge.path=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/vsDiffMerge.exe
difftool.vsdiffmerge.cmd=/t "$LOCAL" "$REMOTE"
mergetool.vsdiffmerge.path=C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/vsDiffMerge.exe
mergetool.vsdiffmerge.cmd=/m /t "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
I use/lunch this from from GitExtensions but it should be very similar from other git Client apps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With