i'm looking for a console UI tool for resolving merge conflicts in git... like vimdiff but 'easier'
3 Answers
I stayed with vimdiff
, but I usually keep only the file to open visible (run :only
when on this window), and then I disable the diff colors (which most of the time hurt the eyes) with :diffoff
.
Finally, I have the following mapping which helps me to browse through the conflict markers:
nnoremap <space>n /^\(<<<<\\|====\\|>>>>\)<CR>
In normal mode, press <space>n
and it will search for the markers, then use n
to go from marker to marker.
From this point, I then edit my conflicts until I am happy.

- 4,230
- 15
- 19
The threesome.vim
vim plugin provides a friendlier merge tool than vanilla vimdiff.
Regarding the comment about seeing which files are going to change when you git pull
: git diff --stat HEAD..origin/$(git rev-parse --abbrev-ref HEAD)
after a git fetch
will tell you that. (Substitute --name-only
for --stat
if you really just want the names and nothing else. Or omit --stat
altogether to see the actual incoming diffs) You'll likely want to add an alias for this in your global configuration file.

- 1,136
- 11
- 22
This isn't exactly what you're looking for, but git stash
is very helpful for resolving merges. Just do:
git stash create
git pull
git stash pop <stashnum>
Where <stashnum>
is the output from git stash create

- 6,920
- 6
- 40
- 52
-
i use git stash a lot, thanks. is there a simple way to know which files will be updated in the next 'git pull' ? – arod Feb 17 '10 at 22:29