Skip to content

Instantly share code, notes, and snippets.

@raouldc
Created September 29, 2016 22:25
Show Gist options
  • Save raouldc/201dbaebe80e8c495377374135d1c923 to your computer and use it in GitHub Desktop.
Save raouldc/201dbaebe80e8c495377374135d1c923 to your computer and use it in GitHub Desktop.
.gitconfig for git on Cygwin using Beyond Compare 4 for diff and merge
[difftool "sourcetree"]
cmd = 'C:/Program Files/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
cmd = 'C:/Program Files/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
trustExitCode = true
[credential]
helper = manager
modalprompt = true
[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
#use cygpath to transform cygwin path $LOCAL (something like /tmp/U5VvP1_abc) to windows path, because bc3 is a windows software
cmd = \"c:/program files/beyond compare 4/bcomp.exe\" "$(cygpath -w $LOCAL)" "$REMOTE"
[merge]
tool = bc3
[mergetool]
prompt = false
[mergetool "bc3"]
trustExitCode = true
keepBackup = false
cmd = \"c:/program files/beyond compare 4/bcomp.exe\" "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
[core]
editor = nano
@raouldc
Copy link
Author

raouldc commented Oct 4, 2016

Note: this will break diff and merge in other tools like VS. need to figure out a way to set custom merge/diff tools for each application, a la sourcetree

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