English 中文(简体)
console UI tool for resolving merge conflicts in git... like vimdiff but easier
原标题:

i m looking for a console UI tool for resolving merge conflicts in git... like vimdiff but easier

问题回答

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.

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.

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





相关问题
git confusion - cloning a repo is returning a past version

Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...

Tips on upgrading CVS to git/hg?

We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...

Using Git in a TFS shop

Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...

热门标签