What's a good (free) visual merge tool for Git? (on windows)

162,648

Solution 1

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.

Solution 2

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

Solution 3

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

P4Merge

Solution 4

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.

Solution 5

  • 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.
Share:
162,648

Related videos on Youtube

Tal Galili
Author by

Tal Galili

Statistics, blogging, and the hope for a happy long life.

Updated on December 06, 2020

Comments

  • Tal Galili
    Tal Galili over 3 years

    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.

  • eckes
    eckes almost 13 years
    +1 for mentioning paid options.
  • Preet Sangha
    Preet Sangha almost 13 years
    I have heard many good things about Araxis too.
  • Preet Sangha
    Preet Sangha almost 13 years
    Depite favouring BC, I'm going to check this tool out.
  • VonC
    VonC almost 13 years
    @Preet: BC remains the best ;) But for a free tool (multi-platform at that), kdiff3 is not bad.
  • Leif Gruenwoldt
    Leif Gruenwoldt almost 10 years
    I think the question was about resolving merge conflicts.
  • flteam
    flteam over 9 years
    Is this still free? It doesn't appear to be free at all.
  • Daniel Little
    Daniel Little over 9 years
    Yes, still 100% free, but their download page hides it a little.
  • Warpzit
    Warpzit over 9 years
    but it defintly isn't that good either :) I tend to find it easier to use my regular code editor.
  • VonC
    VonC over 9 years
    @Warpzit I agree there is a bit of a learning curve, but I am used to it now ;)
  • Daniel Tonon
    Daniel Tonon about 9 years
    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.
  • John
    John about 9 years
    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.
  • tempestSA
    tempestSA almost 9 years
    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"
  • Mark C
    Mark C almost 9 years
    +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
    Mark C almost 9 years
    Once installed configure as mergetool using: git config --global merge.tool "p4merge" && git config --global mergetool.p4merge.path "C:\Program Files\Perforce\p4merge.exe"
  • Pacerier
    Pacerier over 8 years
    winmerge is lousy. The UI makes it hard to tell the left from the right.
  • Pacerier
    Pacerier over 8 years
    @Gordolio, Is there a "simple" or "low resolution" UI for meld? The graphics is a bit too beautiful which totally chokes on huge files.
  • Shridutt Kothari
    Shridutt Kothari over 8 years
    Thanks for pointing open source options here!
  • rleelr
    rleelr about 8 years
    Then run: git config --global merge.tool "kdiff3"; git config --global mergetool.kdiff3.path "C:\Program Files\KDiff3\kdiff3.exe"
  • Stephen Hosking
    Stephen Hosking almost 8 years
    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
    Stephen Hosking almost 8 years
    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).
  • mindplay.dk
    mindplay.dk almost 8 years
    TortoiseGitMerge is actually quite good - I don't know kdiff3, but have never been unhappy or missed anything in TortoiseGitMerge, it lets me do both two and three-way merges very quickly and intuitively.
  • Lazy Badger
    Lazy Badger almost 8 years
    @mindplay.dk - TortoiseGitMerge is (mostly) ol' good TortoiseMerge under the hood
  • Artif3x
    Artif3x about 7 years
    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.
  • user4674453
    user4674453 almost 7 years
    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.
  • VonC
    VonC almost 7 years
    @user4674453 regarding the resolution, see blogs.msdn.microsoft.com/sqlreleaseservices/… (replace ssms by winmerge name and path)
  • user4674453
    user4674453 almost 7 years
    @VonC, not my job. I've chosen another tool instead.
  • VonC
    VonC almost 7 years
    @user4674453 OK. What did you choose on Windows? Beyond Compare?
  • user4674453
    user4674453 almost 7 years
    @VonC, I've chosen Diffmerge from SourceGear. It is mentioned in one of answers.
  • andrew.rockwell
    andrew.rockwell over 6 years
    P4Merge doesn't support --dir-diff, which is a dealbreaker for me
  • andrew.rockwell
    andrew.rockwell over 6 years
    TortoiseMerge doesn't support dir-diff
  • User
    User over 6 years
    Link is dead. Updated link: perforce.com/downloads/visual-merge-tool
  • Artur Kędzior
    Artur Kędzior almost 6 years
    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.
  • VonC
    VonC almost 6 years
    @ArturKędzior Thank you. I have included your comment in the answer for more visibility.
  • mosh
    mosh about 5 years
    meld is too slow on windows, faster ones are: kdiff3, winmergeu