For all my present Diff / Merge needs I'm using Beyond Compare [1]; when I decided to buy a license for it I tried other similar tools, both payware and freeware.
Now BC is at version 3, and I think it's a great tool... but what is your experience in this field? Do you think there is something better? And what are the features you like best on your favorite Diff tool?
I'm recollecting here a list of the tools mentioned in the answers below, in order of preferences (more or less), separating pay- from free- ware and indicating supported operating system. Hope this helps.
PAYWARE
FREEWARE
I have used a few others and found that Beyond Compare [1] is quite good. I say stick with that. Just a note - this is payware, not free.
[1] http://www.scootersoftware.com/I'm partial to WinMerge [1], which does everything I need. I've never used Beyond Compare so I can't speak to the difference in features between the two.
[1] http://winmerge.org/I use meld.
sudo apt-get install meld
I second the WinMerge [1] recommendation, it handles file/folder diffing and merging greatly. There are handy filters built in as well to block out source control files and stuff like that. Plus it's free! Here's the list of features from the site:
Diff Merge from SourceGear is free and good: http://www.sourcegear.com/diffmerge/index.html
Vimdiff.
It's part of the vim distribution. Interactive, syntax-highlighting diff with the full text editing power of vim. It uses folding ("zc" to close a fold, "zo" to open one) to hide matching parts.
^W [numb] <OR>
where <OR>
means <
or >
. - hhh
^W =
resizes your windows to be the same size. - Laurence Gonsalves
By far, BeyondCompare [1] is the best diff/merge tool that I have ever used.
I vote for KDiff3 [1]. It supports 3-way merging, which is great for working with copy-edit-merge version control systems like Subversion. It also allows editing in the results pane.
The only other diff tool I know that supports 3-way merging is diffmerge [2].
Winmerge [3] does not support 3-way merging, so it is not good enough for me.
[1] http://kdiff3.sf.net/Beyond Compare? That's so 80's...
Check out, history flow [1], now you're talking diff, over an infinite set of changes. Download on IBM.com. [2]
There is even more, a subversion plugin [3] and a blog post on the API [4] history flow uses.
It's the closet thing that you can get (yes free code available) that even BEGINS to be in the same ballpark as the visualization guru, Ben Fry, had developed the revisionist [5]:
While it's obvious that the code in a software project changes over time, less obvious is the nature of how the code how individual changes have taken place in a broader context. Projects are typically structured as a collection of files that are added, removed, and reorganized throughout the course of development. The contents of the individual files are modified, line by line or in large pieces for every fix and feature.
the Revisionist, de facto, more than beyond comparison, it's beyond reproach.
[1] http://www.research.ibm.com/visual/projects/history_flow/index.htmThe best tool which I saw and used is Araxis Merge [1]. It has a lot of useful functions, including:
Also heres how the 3 way comparison look like
We use Perforce for source control at work, and now Perforce have released their merge tool as a free stand alone merge tool. I think it's pretty good, plus, it integrates well with Perforce server.
http://www.perforce.com/perforce/products/merge.html
I use perforce merge [1] for single-file source merges and araxis merge [2] for folder-to-folder compare.
I think perforce is superior for single file - I really like it's 4-way merge screen (source control branch tip, local version, common ancestor from source control and target) and it's color/shape-coding. Also, it's automatic merge (suggested target) is very smart and suitable for Java.
Araxis merge has the unique capability to compare an entire folder tree, drilling down to file-to-file compare in a click. I find this useful in version compare situations when I quickly need to assess the amount of changes or track a specific change.
[1] http://www.perforce.com/perforce/products/merge.htmlediff - bundled with Emacs
It handles pair-wise diffing, file merging, directory diffing/merging. It can apply mutli-file patches, and it groks version control. Plus, you get all the features of Emacs: .zip/.gz/.tar support, syntax highlighting, ftp/ssh support, unicode, etc. etc.
I think Kompare has the best interface of any diff tool I have even seen, I just wish I could find something like it in Windows.
http://www.caffeinated.me.uk/kompare/
svn diff | kompare -
. - Beni Cherniavsky-Paskin
I use the Compare plugin for Notepad++ [1]; its built right into your editor. While it doesn't compare directories or anything "advanced," it does a great job at file-to-file comparison. And it's free.
[1] http://notepad-plus.sourceforge.net/I use CodeCompare (http://www.devart.com/codecompare/) for C# code comparing. It is very useful - product is integrated to the Visual Studio and I can make changes with the help of the Visual Studio editor.
For simple comparisons, I use PsPad [1], which is my default text editor.
It is quite basic, as it only displays added, removed of modified lines, as shown below:
However, PsPad is a great text editor and free. So I think it deserves to be listed in this post...
[1] http://www.pspad.comI like the merge that is included in Tortoise SVN
I've tried a bunch of the other diff tools out there and I still keep coming back to Beyond Compare. I haven't tried v3 of Beyond Compare yet though...
Would agree with the top 3:
Otherwise:
WinMerge (free)
Diff Merge from SourceGear (free)
Diffuse (http://diffuse.sourceforge.net/) is good cross-platform diff/merge tool. It's features include:
Beyond Compare for Windows is a must - in Mac land there aren't many to choose from (which is a pitty) Changes isn't too bad, but pales in comparison to a full featured tool like Beyond Compare.
Beyond compare is an excellent tool. The only downside is it is payware. Wikipedia has a great chart comparing all the features amongst the various programs even some not listed in the question. link text [1]
[1] http://en.wikipedia.org/wiki/Comparison%5Fof%5Ffile%5Fcomparison%5FtoolsI'd second the recommendation of (g)vimdiff [1]. Often its very useful to have a powerful text editor, complete with syntax highlighting while comparing (and merging) files.
For situations where a tool (e.g. CVS or git) has already run a merge and left conflicts in a file, xxdiff [2] has a really neat mode where it can separate the file and show it in a side-by-side diff.
[1] http://www.vim.org/I've had good luck with ExamDiff [1]; it's free and does what I need it to do.
[1] http://www.prestosoft.com/ps.asp?page=edp_examdiffplease try Compare++ [1]. The diff tool is a visual specialized tool for source code file comparison, merging and folder synchronization.
[1] http://www.coodesoft.com
Most diff tools report just text differences at the line level.
A tool that compares source code structures, regardless of whitespace formatting (including line breaks) and reports reports changes in terms of structures inserted, deleted, moved, replaced, or changed by consistent identifier renaming gives better information to the programmer.
Our Smart Differencer [1] does this for many languages, including Java, C#, Javascript and COBOL.
EDIT Feb 2010: Now does C++, PHP and XML
EDIT Aug 2010: Now does Python, EGL and Natural
EDIT Nov 2010: Now does VB6, VBScript, VB.net
EDIT Aug 2011: Does C++11, Java 1.6/Java 1.7
[1] http://www.semanticdesigns.com/Products/SmartDifferencer/index.htmlMergely [1] is an online merge tool in the vein of Araxis Merge that can be handy when you want to diff something quick, but it also allows you to share differences and link to them on blogs or emails... and it's totally free.
[1] http://www.mergely.comYou might be interested in the open-source structural comparison tool I have been developing.
http://www.cs.indiana.edu/~yw21/ydiff.html
It experimentally supports C++, JavaScript, Python, Scheme, Emacs Lisp (and other S-expression based languages). It actually parses the programs and compare their parse trees, with semantics-awareness. The parsers are built using a parser combinator library which eases the job by quite a bit. It can also detect and trace refactorization. You can get a feel of it by playing with interactive demos:
Python: http://www.cs.indiana.edu/~yw21/demos/demo1-demo2.html
JavaScript: http://www.cs.indiana.edu/~yw21/demos/nav-nav-div.html
C++: http://www.cs.indiana.edu/~yw21/demos/d8-3404-d8-8424.html
Emacs Lisp: http://www.cs.indiana.edu/~yw21/demos/paredit20-paredit22.html
Scheme: http://www.cs.indiana.edu/~yw21/demos/mk-mk-c.html
I have a blog post about its design here:
http://yinwang0.wordpress.com/2012/01/03/ydiff
It is open source. You can get its code from GitHub:
http://github.com/yinwang0/ydiff
I'm currently not very active developing it (because of coursework and research), but I would continue if there are lots of interest in it. Also I welcome people to contribute to its development.
On Mac OS X you have Apples FileMerge [1] which comes with the Developer Tools.
[1] http://www.apfelwiki.de/Main/FileMergeA couple more for the list.
Changes for OSX as payware (http://www.changesapp.com)
tkdiff is free under the GPL (http://tkdiff.sourceforge.net)
I really like the free and excellent Perforce Merge tool [1] (also known as p4merge).
[1] http://www.perforce.com/perforce/downloads/windowslist.html#ntx86Even if I did not try these, I'm adding for completeness also:
ECMerge, 2 and 3 way merge, cross-platform (runs on Windows, Mac OS X, Linux and Solaris 10): http://www.elliecomputing.com/Home/default.asp
MergePlant, again 3-way merge: http://www.mikado-ltd.com/
Take a look at the Xdiff in Plastic [1]. Together with the typical diff stuff, it can also track moved code fragments even when they've been modified after the move (some sort of refactor-aware diff tool)
[1] http://codicesoftware.blogspot.com/2010/07/move-support-in-diff.htmlI really like the diff tool in IntelliJ IDEA [1]. Wish they had a standalone version as well.
[1] http://www.jetbrains.com/idea/features/local_history.htmlFor .NET developers, there is an original code diff tool : NDepend [1]
Basically NDepend can analyze a code base and create and then persist a snapshot of the code. 2 such snapshots, taken at 2 different times, can be compared. Then, NDepend lets ask for new methods/classes, removed methods/classes, methods/classes where code was changed... as easily as writing:
SELECT METHODS WHERE CodeWasChanged
Also, NDepend can plug to any text diff tool listed here. The user can then compare the 2 versions of the changed method or class. Another cool capability, is to plug NDepend to RedGate Reflector [2], decompile the 2 versions of the method/class and compare these 2 versions with a text diff tool. More information here: Advanced Code Diff [3]
[1] http://www.NDepend.com
I've recently tried most of the diff tools mentioned here and it appears to me that most of them (even the expensive ones) lack one or both of two key features.
Separate output pane for merging. If you have two versions of a source file where separate developers have trampled on a complicated algorithm, there is imo no substitute for having a separate editable output view so that you can retain a view of each original file while resolving the conflict. Unless I missed it Araxis Merge does not have this feature. Not that it matters to me, Araxis Merge now uses an Office 2005 ribbon style UI so that 1/4 of the screen is taken up by a shifting sea of widgets, and there's no way to revert to an alternate UI, and I'm a ludite so I just can't be dealing with that.
Take both. There should be a trivial means by which you can take both conflicting changes in whichever order you like.
Most of the other merge tools lacked either one or both of these features. The one which had them both was KDiff3, and with its intuitive support for directory merging and sync this is imo the clear winner, and the fact that it's free and open source doesn't hurt either.
Beyond Compare also had both features but I found the UI of KDiff to be cleaner and more to my liking.
Now if anyone knows of a diff tool that has both of the features mentioned above but which can also do a merge between two files saving the results back to both files, then you will have my everlasting gratitude. Failing that I'll just pester the KDiff3 devs for it to be added. I want that feature so that I can handle directory synchronization in the case where files have conflicting changes.
I used Compare IT, it's payware but you can evaluate it for 30 days. Download it from: http://www.grigsoft.com/wincmp3.htm
It's not that expensive either. I like the small toolbar.
http://www.grigsoft.com/register.htm
I personally use Delta Walker [1]. It is available on Windows/OS X/Linux, works as good as Araxis, but is much cheaper.
[1] http://www.deltopia.com/what about good old 'diff' command? Is good writing diff scripts.
There is http://prettydiff.com/ for web stuff. It is an algorithmic diff program that can compare minified code to development code.
CSDiff [1] is not the Best but wasn't mentioned and it's quite minimalist, free and fast
[1] http://www.componentsoftware.com/products/csdiff/I like SmartSynchronize [1]. It is effectively the built-in compare/merge tool for SmartCVS [2] (and I assume SmartSVN [3]), but separated out for use on the file system. Written in Java, so runs on most Java-supporting platforms.
[1] http://www.syntevo.com/smartsynchronize/index.htmlSourceGear's Diffmerge also has folder diffing. Using the tool with Mercurial :-)
I don't know Beyond Compare or Araxis thus can't comment on them.
Another vote from me for WinMerge [1]. I've been using this tool for some years now and with a recent new project I discovered just another nice feature:
The installer integrates nicely with a local clearcase client installation.
[1] http://www.winmerge.org/WinMerge and eDiff; I use WinMerge when I'm comparing entire folders, but eDiff for 2 or 3 files, or snippet comparison.
After trying a couple other diff programs for Windows, I stuck with Araxis Merge. The standard version does about everything I'd want done with 2-way diffing. Also, the immediate impression it makes is very good; it doesn't overwhelm you with colored lines. In other words, it tells you what you need to know without confusion. It is also supported very well.
I think it depends on what you're trying to compare and why. I use WinMerge most of the time. Sometimes I use DiffMerge. Sometimes I use Tiny Hexer.
I use winmerge. One thing I /would/ like to see in it would be the ability to force a match (this line on the left is that line on the right)
Another vote for Araxis Merge. The Standard Edition has covered 95% of the diff/merge tasks that I've encountered. It is good enough that I purchased a personal copy for work.
WinMerge is out because it doesn't do side-by-side comparisons of FOLDERS/FOLDER TREES.
I currently use BC2.x & love it.
Also, it is licensed for use BY ME on unlimited PCs, and can be configured as a PORTABLE APP.
I never heard of Araxis, but it looks good, and it does 3-way merges (BC2 doesn't, I don't know if BC3 does). But Araxis is MUCH more expensive, and is licensed per computer (thus I doubt it can be configured to be portable).