Skip to content

Instantly share code, notes, and snippets.

@topas
Created February 9, 2015 00:12
Show Gist options
  • Save topas/8cffcb763ec2b7a4eaf6 to your computer and use it in GitHub Desktop.
Save topas/8cffcb763ec2b7a4eaf6 to your computer and use it in GitHub Desktop.
Cygwin Git configuration p4merge as mergetool and difftool (part of .gitconfig file)
# run ln -s /cygdrive/c/Program\ Files/Perforce/p4merge.exe /usr/bin/p4merge
[diff]
tool = p4diff
[merge]
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = /usr/bin/p4merge \"$(cygpath -w \"$BASE\")\" \"$(cygpath -w \"$LOCAL\")\" \"$(cygpath -w \"$REMOTE\")\" \"$(cygpath -w \"$MERGED\")\"
prompt = false
keepBackup = false
keepTemporaries = false
trustExitCode = false
[mergetool "p4diff"]
cmd = /usr/bin/p4merge \"$(cygpath -w \"$LOCAL\")\" \"$(cygpath -w \"$REMOTE\")\"
prompt = false
keepBackup = false
keepTemporaries = false
trustExitCode = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment