Skip to content

Instantly share code, notes, and snippets.

@mkoby
Created March 6, 2013 17:09
Show Gist options
  • Save mkoby/5101012 to your computer and use it in GitHub Desktop.
Save mkoby/5101012 to your computer and use it in GitHub Desktop.
Version Control with Git - 08 - Merge Conflicts
#Set the mergetool
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"'
#Tell git to trust the mergetool's exit code, this way git doesn't always ask if the merge was successful
git config --global mergetool.diffmerge.trustExitCode true
#When a merge conflict happens, you can load the mergetool with
git mergetool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment