Skip to content

Instantly share code, notes, and snippets.

@delameko
Created September 8, 2015 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save delameko/e556bdcc1057b15f5f07 to your computer and use it in GitHub Desktop.
Save delameko/e556bdcc1057b15f5f07 to your computer and use it in GitHub Desktop.
Using DiffMerge as difftool in git
git config --global diff.tool diffmerge
git config --global difftool.diffmerge.cmd 'diffmerge "$LOCAL" "$REMOTE"'
git config --global merge.tool diffmerge
git config --global mergetool.diffmerge.cmd 'diffmerge --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"'
git config --global mergetool.diffmerge.trustExitCode true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment