Terminal Merge Conflict Resolution
A very important tool in the toolbox of any collaborating developer is a merge conflict resolution tool. OS X has the fantastic FileMerge, there are various graphical tools for linux like kdiff3, but I have yet to hear of one for the terminal. There’s vimdiff, but it is really not up to the task of merge conflict resolution (doesn’t handle 3-way diffs). There’s probably something in emacs, just because there’s always something for emacs. Emacs users please enlighten me, I’m not above using emacs for merge-conflict resolution. Might even be the gateway drug.
It doesn’t seem overly hard (at least, no harder than writing kdiff3 or FileMerge) to make an ncurses tool that will take a 3-way merge and let you efficiently choose A, B, or edit for each diff section. Can it really be that nobody has done it yet?
August 24th, 2009 at 21:37
See the emerge section of the emacs manual for one possible emacs solution. There may be others as well, but I tend to use a GUI tool for merging, so I haven’t done a lot of looking.
August 24th, 2009 at 22:05
vimdiff can handle up to 4 files for diff handling.
:h vimdiff in the editor
August 25th, 2009 at 00:52
Sure, HarleyPig, make me go back and relearn why vim isn’t up to the task and do another post about it. Thanks. :-P
August 25th, 2009 at 01:41
I use vimdiff for 3 way merges all the time, love it.
August 25th, 2009 at 01:55
M-x ediff-documentation
Gives information on the ediff functions in Emacs, which are fantastic.
September 3rd, 2009 at 17:04
What we really need is a vim library that allows you to open up a vim pager window within any ncurses program. Now that would be AWESOME!