Set tool for manage merging
git mergetool -t vimdiff
Background colors explanation
- Blue is there for new block
- Purple is there for a differing line
- Red is there for differing characters in the differing line
http://ashishgrover.com/effective-vimdiff/
Configuring diff tool with .gitconfig
[diff]
tool = vimdiff
https://stackoverflow.com/questions/6412516/configuring-diff-tool-with-gitconfig
Commands
]c : - next difference
[c : - previous difference
do - diff obtain
dp - diff put
zo - open folded text
zc - close folded text
:diffupdate :diffu - re-scan the files for differences
:diffget RE " get from REMOTE
:diffget BA " get from BASE
:diffget LO " get from LOCAL
:diffput RE " get from REMOTE
:diffput BA " get from BASE
:diffput LO " get from LOCAL
. Git mergetool generates unwanted .orig files
git config --global mergetool.keepBackup false
find . -name \*.orig
find . -name \*.orig -delete
git clean -n *.orig
git clean -f *.orig