Created
March 6, 2013 17:09
-
-
Save mkoby/5101012 to your computer and use it in GitHub Desktop.
Version Control with Git - 08 - Merge Conflicts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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