HOWTO: Use vimdiff as git mergetool1
a) Setup vimdiff as default mergetool:
git config merge.tool vimdiff
git config merge.conflictstyle diff3
git config mergetool.prompt false
b) Resolve conflict with vimdiff:
git mergetool
c) Files opened:
LOCAL - file from current branch
BASE - common ancestor
REMOTE - file you are merging into your branch
MERGED - merge result
d) Obtain change from REMOTE, BASE, LOCAL:
:diffg RE
:diffg BA
:diffg LO
e) Commit manual changes to repository:
git commit
-
Based on rosipov.com. ↩