169

A similar question was already asked, but for Ubuntu.

It would help to know if the tool is free as in beer or as in liber.

Also, up and downs of the tool would be nice to know.

Community
  • 1
  • 1
Tal Galili
  • 24,605
  • 44
  • 129
  • 187

7 Answers7

84

I've also used Meld. It's written in python. There is an official installer for Windows that works well.

Install it and then set it as your default mergetool.

$ git config --global merge.tool "meld"
$ git config --global mergetool.meld.path "C:\Program Files (x86)\Meld\Meld.exe"

If using a GUI GIT client, try the following (instructions for SourceTree, adjust accordingly)

  • In SourceTree, go to Tools/Options/Diff
  • In External Diff Tool, choose Custom
  • Enter C:\Program Files (x86)\Meld\meld.exe in Diff Command and $LOCAL $REMOTE in Arguments
  • In Merge Tool, choose Custom
  • Enter C:\Program Files (x86)\Meld\meld.exe in Diff Command and $LOCAL $MERGED $REMOTE in Arguments
Community
  • 1
  • 1
Gordolio
  • 1,925
  • 15
  • 22
  • 9
    Thanks, Meld is really nice :) It's really clear and easy to see whats going on. Thanks for posting the install instructions. I would have been lost without those. – Daniel Tonon Apr 19 '15 at 11:55
  • 5
    If you are using cygwin/babun, replace the 2nd option with: `git config --global mergetool.meld.path "/cygdrive/c/Program Files (x86)/Meld/Meld.exe"` – tempestSA Jul 14 '15 at 11:10
  • 1
    +1 for the git config, I used it with P4Merge below: `git config --global merge.tool "p4merge" && git config --global mergetool.p4merge.path "C:\Program Files\Perforce\p4merge.exe"` – Mark C Jul 17 '15 at 08:13
  • @Gordolio, Is there a "simple" or "low resolution" UI for meld? The graphics is a bit *too* beautiful which totally chokes on huge files. – Pacerier Nov 02 '15 at 03:21
  • 1
    I tried Meld and it was good, with some nice visuals, but in the end went for Beyond Compare, with pay, and have been very happy. One minus of Meld is that the buttons don't give mouseover descriptions. Another - Beyond Compare provides buttons to move from one difference to the next. Another - Beyond Compare shows the file paths in the window title bars. Meld was certainly "Good enough", but I'd rather pay for Beyond Compare. (And I have no affiliation with Beyond Compare). – Stephen Hosking Jul 13 '16 at 10:03
  • 1
    meld is too slow on windows, faster ones are: kdiff3, winmergeu – mosh Mar 28 '19 at 17:07
  • Nothing wrong with Meld, at least as a first diff tool to try, and very easy to download and install. Very nice gui. Bonus: is from the GNOME project. Better than the builtin difftool in VSCode, and nicer than what I was used to use in Tortoise SVN. – Roland Feb 14 '23 at 19:13
78

On Windows, a good 3-way diff/merge tool remains kdiff3 (WinMerge, for now, is still 2-way based, pending WinMerge3)

See "How do you merge in GIT on Windows?" and this config.


Update 7 years later (Aug. 2018): Artur Kędzior mentions in the comments:

If you guys happen to use Visual Studio (Community Edition is free), try the tool that is shipped with it: vsDiffMerge.exe. It's really awesome and easy to use.

Artur Kedzior
  • 3,994
  • 1
  • 36
  • 58
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Depite favouring BC, I'm going to check this tool out. – Preet Sangha Aug 30 '11 at 10:21
  • 3
    @Preet: BC remains the best ;) But for a *free* tool (multi-platform at that), kdiff3 is not bad. – VonC Aug 30 '11 at 10:24
  • but it defintly isn't that good either :) I tend to find it easier to use my regular code editor. – Warpzit Mar 26 '15 at 14:43
  • 1
    @Warpzit I agree there is a bit of a learning curve, but I am used to it now ;) – VonC Mar 26 '15 at 14:45
  • Then run: git config --global merge.tool "kdiff3"; git config --global mergetool.kdiff3.path "C:\Program Files\KDiff3\kdiff3.exe" – rleelr Jun 01 '16 at 14:47
  • winmerge looks ugly on high resolution screen and useless for merge. After I've removed line from the right file, I was unable used the tool having error message. – user4674453 Jul 12 '17 at 14:38
  • @user4674453 regarding the resolution, see https://blogs.msdn.microsoft.com/sqlreleaseservices/ssms-highdpi-support/ (replace ssms by winmerge name and path) – VonC Jul 12 '17 at 15:09
  • @VonC, not my job. I've chosen another tool instead. – user4674453 Jul 16 '17 at 14:42
  • @user4674453 OK. What did you choose on Windows? Beyond Compare? – VonC Jul 16 '17 at 16:00
  • @VonC, I've chosen Diffmerge from SourceGear. It is mentioned in one of answers. – user4674453 Jul 17 '17 at 17:43
  • If you guys happen to use Visual Studio (Community Edition is free) try tool that is shipped with it: `vsDiffMerge.exe`. It's really awesome and easy to use. – Artur Kedzior Aug 16 '18 at 14:31
  • 1
    @ArturKędzior Thank you. I have included your comment in the answer for more visibility. – VonC Aug 16 '18 at 14:36
30

I've been using P4Merge, it's free and cross platform.

P4Merge

Daniel Little
  • 16,975
  • 12
  • 69
  • 93
  • 1
    Is this still free? It doesn't appear to be free at all. – null_pointer Oct 02 '14 at 17:11
  • 4
    Yes, still 100% free, but their download page hides it a little. – Daniel Little Oct 03 '14 at 03:50
  • 8
    It is free as Daniel said but when you run the installer, you need to disable all of the options except the "Visual Merge Tool". Otherwise, it will prompt you to connect to a Perforce server. Works great with SourceTree. – John Jun 07 '15 at 15:53
  • 12
    Once installed configure as mergetool using: `git config --global merge.tool "p4merge" && git config --global mergetool.p4merge.path "C:\Program Files\Perforce\p4merge.exe"` – Mark C Jul 17 '15 at 08:14
  • Thanks for pointing open source options here! – Shridutt Kothari Feb 09 '16 at 12:45
  • 1
    Trying to figure out how to download the windows version of p4merge using your link seems quite a task. There's no clear download link that I can see. – Artif3x May 12 '17 at 14:46
  • P4Merge doesn't support --dir-diff, which is a dealbreaker for me – andrew.rockwell Nov 30 '17 at 01:54
  • 1
    Link is dead. Updated link: https://www.perforce.com/downloads/visual-merge-tool – User Mar 24 '18 at 22:57
27

I don't know a good free tool but winmerge is ok(ish). I've been using the beyond compare tools since 1999 and can't rate it enough - it costs about 50 USD and this investment has paid for it self in time savings more than I can possible imagine.

Sometimes tools should be paid for if they are very very good.

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
  • 7
    +1 for mentioning paid options. – eckes Aug 29 '11 at 09:13
  • 1
    winmerge is lousy. The UI makes it hard to tell the left from the right. – Pacerier Nov 02 '15 at 03:20
  • 1
    I used WinMerge for years and think it's great. Then I switched to git for version control and needed a GUI for version comparison. First I tried Meld for and found it good, but short of features. Beyond Compare has solved it for me, and I'm quite happy to pay for it. – Stephen Hosking Jul 13 '16 at 09:57
17
  • TortoiseMerge (part of ToroiseSVN) is much better than kdiff3 (I use both and can compare);
  • p4merge (from Perforce) works also very well;
  • Diffuse isn't so bad;
  • Diffmerge from SourceGear has only one flaw in handling UTF8-files without BOM, making in unusable for this case.
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
1

Another free option is jmeld: http://keeskuip.home.xs4all.nl/jmeld/

It's a java tool and could therefore be used on several platforms.

But (as Preet mentioned in his answer), free is not always the best option. The best diff/merge tool I ever came across is Araxis Merge. Standard edition is available for 99 EUR which is not that much.

They also provide a documentation for how to integrate Araxis with msysGit.

If you want to stick to a free tool, JMeld comes pretty close to Araxis.

Community
  • 1
  • 1
eckes
  • 64,417
  • 29
  • 168
  • 201
-1

What's wrong with using Git For Windows? From the repo view, there's an icon of the branch you're in (at the top), and if you click on manage you can drag&drop in a very visual and convenient way.

user1553825
  • 160
  • 1
  • 1
  • 6