Skip to content

Instantly share code, notes, and snippets.

@JunielKatarn
Last active March 29, 2024 00:03
Show Gist options
  • Save JunielKatarn/530005dd432e2bd4552c856d4f886cc7 to your computer and use it in GitHub Desktop.
Save JunielKatarn/530005dd432e2bd4552c856d4f886cc7 to your computer and use it in GitHub Desktop.
Git config to use vsdiffmerge.exe as a diff/merge tool
# 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
@JunielKatarn
Copy link
Author

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.

Thanks for the tip.
I have not used this config in a long time, but may update so it's correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment