What's the best three-way merge tool? [closed]

老子叫甜甜 提交于 2019-11-26 04:57:24

问题


Subversion, Git, Mercurial and others support three-way merges (combining mine, theirs, and the \"base\" revision) and support graphical tools to resolve conflicts.

What tool do you use? Windows, Mac OS X, Linux, free or commercial, you name it.

Here\'s a few that I\'ve used or heard of, just to get the conversation started:

  • KDiff3
  • DiffMerge
  • P4Merge
  • Meld
  • Beyond Compare Pro.

(I recognize that this is sort of like the Best Diff Tool, but it\'s different in that I explicitly focus on three-way merge tools; WinMerge is off the list, for example.)


回答1:


KDiff3 open source, cross platform

Same interface for Linux and Windows, very smart algorithm for solving conflicts, regular expressions for automatically solving conflicts, integrate with ClearCase, SVN, Git, MS Visual Studio, editable merged file, compare directories

Its keyboard-navigation is great: ctrl-arrows to navigate the diffs, ctrl-1, 2, 3 to do the merging.

Also, see https://stackoverflow.com/a/2434482/42473




回答2:


Just checked out P4merge since I heard about it in another blog article:

Very slick interface, and FREE! I've been a faithful Araxis Merge user, but considering this is free and awesome, I'd encourage you to check it out.




回答3:


Beyond Compare 3 Pro supports three-way merging, and it is a pretty impressive merge tool. It's commercial (but worth it, IMHO) and is available on Windows, Linux, and Mac OS X.

As pointed out in a comment, it's also inexpensive.

Note: If one does not have a merge set, that is, merge markers resident in the destination file, Beyond Compare does not offer three-way file compare/editing. Beyond Compare says that feature is on their list.

Note: 3-way merge is a feature in the Pro edition of Beyond Compare 3 only




回答4:


Meld Diff Viewer

I have had only good experiences working with Meld. I use it when I have to do messy code merges between branches. It is simple to use and has a clean interface.

  • Open Source
  • Linux, Windows and MacOS Supported
  • Multiple File Diff
  • Three-way Compare Support

In Ubuntu, install is as simple as: sudo apt-get install meld




回答5:


vimdiff. It's great. All you need is a window three feet wide.




回答6:


Source Gear Diff Merge:

Cross-platform, true three-way merges and it's completely free for commercial or personal usage.




回答7:


Araxis Merge. It is commerical, but it is so worth it... It is available for Windows and the Mac OS X.




回答8:


Kdiff3 conflict resolution algorithm is really impressive.

Even when subversion indicates a conflict, Kdiff3 solves it automatically. There's versions for Windows and Linux with the same interface. It is possible to integrate it with Tortoise and with your linux shell.

It is in the list of my favorite open source software. One of the first tools I install in any machine.

You can configure it as the default diff tool in Subversion, Git, Mercurial, and ClearCase. It also solves almost all the ClearCase conflicts. In Windows, it has a nice integration with windows explorer: select two files and right click to compare them, or right click to 'save to later' a file, and then select another one to compare.

The merged file is editable. Has slick keyboard shortcuts.

You can also use it compare and merge directories. See:

An advanced feature is to use regular expressions for defining automatic merges.

My only annoyance is that it is a little difficult to compile if it isn't present in your favorite distro repository.




回答9:


I love Ediff. It comes built-in with GNU Emacs.

To do a three-way diff, use ediff-files3 (for selecting three files) or ediff-buffer3 (for selecting three already-open buffers). You'll get a screen looking like this:

Note the word-difference higlighting.

You can hit n or p to go to the next/previous diffs, while ab will copy the region from buffer a (the leftmost one) to buffer b (the middle one), and similarly for other two-letter combinations of a, b, c; rb will restore the region in buffer b. Hit ? for a quick help menu, or read the fine manual on diff3 merging in Emacs.




回答10:


Ultracompare. It is really good, handles large files (more than 1 GB) well, is available for Windows/Mac/Linux, and it's commercial, but it is worth it.




回答11:


Diffuse is an easy to use three-way merge tool. It supports all of the platforms and version control systems you mentioned, and it can compare more than three files at the same time.




回答12:


xxdiff if you're in Linux land.




回答13:


The summary is that I found ECMerge to be a great, though commercial product. http://www.elliecomputing.com/products/merge_overview.asp

I also agree with MrTelly that Ultracompare is very good. One nice feature is that it will compare RTF and Word docs, which is handy when you end up programming in word with the sales guys and they don't manage their docs correctly.



来源:https://stackoverflow.com/questions/572237/whats-the-best-three-way-merge-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!