If you're making frequent small commits, then start by looking at the commit comments with git log --merge
. Then git diff
will show you the conflicts.
For conflicts that involve more than a few lines, it's easier to see what's going on in an external GUI tool. I like opendiff -- Git also supports vimdiff, gvimdiff, kdiff3, tkdiff, meld, xxdiff, emerge out of the box and you can install others: git config merge.tool "your.tool"
will set your chosen tool and then git mergetool
after a failed merge will show you the diffs in context.
Each time you edit a file to resolve a conflict, git add filename
will update the index and your diff will no longer show it. When all the conflicts are handled and their files have been git add
-ed, git commit
will complete your merge.