What's the best visual merge tool for Git? [closed]
Solution 1:
Meld is a free, open-source, and cross-platform (UNIX/Linux, OSX, Windows) diff/merge tool.
Here's how to install it on:
- Ubuntu
- Mac
- Windows: "The recommended version of Meld for Windows is the most recent release, available as an MSI from https://meldmerge.org"
Solution 2:
You can configure your own merge tool to be used with "git mergetool
".
Example:
git config --global merge.tool p4merge
git config --global mergetool.p4merge.cmd p4merge '$BASE $LOCAL $REMOTE $MERGED'
git config --global mergetool.p4merge.trustExitCode false
And while you are at it, you can also set it up as your difftool for "git difftool
":
git config --global diff.tool p4merge
git config --global difftool.p4merge.cmd p4merge '$LOCAL $REMOTE'
Note that in Unix/Linux you don't want the $BASE
to get parsed as a variable by your shell - it should actually appear in your ~/.gitconfig file for this to work.
Solution 3:
Beyond Compare 3, my favorite, has a merge functionality in the Pro edition. The good thing with its merge is that it let you see all 4 views: base, left, right, and merged result. It's somewhat less visual than P4V but way more than WinDiff. It integrates with many source control and works on Windows/Linux. It has many features like advanced rules, editions, manual alignment...
The Perforce Visual Client (P4V) is a free tool that provides one of the most explicit interface for merging (see some screenshots). Works on all major platforms. My main disappointement with that tool is its kind of "read-only" interface. You cannot edit manually the files and you cannot manually align.
PS: P4Merge is included in P4V. Perforce tries to make it a bit hard to get their tool without their client.
SourceGear Diff/Merge may be my second free tool choice. Check that merge screens-shot and you'll see it's has the 3 views at least.
Meld is a newer free tool that I'd prefer to SourceGear Diff/Merge: Now it's also working on most platforms (Windows/Linux/Mac) with the distinct advantage of natively supporting some source control like Git. So you can have some history diff on all files much simpler. The merge view (see screenshot) has only 3 panes, just like SourceGear Diff/Merge. This makes merging somewhat harder in complex cases.
PS: If one tool one day supports 5 views merging, this would really be awesome, because if you cherry-pick commits in Git you really have not one base but two. Two base, two changes, and one resulting merge.
Solution 4:
I hear good things about kdiff3.