-
-
Save JunielKatarn/530005dd432e2bd4552c856d4f886cc7 to your computer and use it in GitHub Desktop.
# PLEASE SEE FEEDBACK. This script is not up to date and may not use the best practices. | |
[diff] | |
tool = vsdiffmerge | |
[difftool] | |
prompt = false | |
[difftool "vsdiffmerge"] | |
cmd = '"C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsdiffmerge.exe"' "$LOCAL" "$REMOTE" //t | |
keepbackup = false | |
trustexitcode = true | |
[merge] | |
tool = vsdiffmerge | |
[mergetool] | |
prompt = false | |
[mergetool "vsdiffmerge"] | |
cmd = '"C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/vsdiffmerge.exe"' "$REMOTE" "$LOCAL" "$BASE" "$MERGED" //m | |
keepbackup = false | |
trustexitcode = true |
As a warning, setting diff.tool
causes issues in Visual Studio 2017 Update 9.7 and Visual Studio 2019 Preview 4/RC (like merges outputting a blank file rather than the merged content). It is much safer not to modify diff.tool and instead invoke this via git difftool --tool vsdiffmerge
.
Note that git gui
internally implements its own command line formatting for each supported diff tool (see mergetool.tcl), so this doesn't work for invocation by right-clicking in the diff view of git gui
.
Note that
git gui
internally implements its own command line formatting for each supported diff tool (see mergetool.tcl), so this doesn't work for invocation by right-clicking in the diff view ofgit gui
.
Thanks for the tip.
I have not used this config in a long time, but may update so it's correct.
Usage:
git difftool ${file1} ${file2}
git mergetool ${file}