29

I downloaded GitKraken for working with Git repositories and it works great for everything I need, but I haven't been able to configure it to use a merge tool like WinMerge or Meld.

When the program sees a conflict it shows up a button which says "Open in merge tool". Since I haven't configured a Merge tool, I head over GitKraken's preferences and checked out the "Merge tool" section. "Git Config Default" option was selected there and I could only choose "None" or "Git Config Default" options.

I installed Meld for using it with GitKraken, and after that I tried to follow these steps to make it usable within GitKraken's interface, but GitKraken's merge tool choice options haven't changed.

After running a few commands from those steps and some others trying to make it work my .gitconfig file looks like this:

[user]
    name = <myname>
    email = <mymail>
[filter "lfs"]
[filter "lfs"]
    clean = git-lfs clean %f
    smudge = git-lfs smudge %f
    required = true
[core]
    autocrlf = true
    excludesfile = C:\\Users\\<myuser>\\Documents\\gitignore_global.txt
[merge]
    tool = meld
[mergetool "meld"]
    path = C:\\Program files (x86)\\Meld\\Meld.exe
[mergetool]
    prompt = false

I'm not really sure what I did and how to make it work... Anyone can help?

Community
  • 1
  • 1
RabidTunes
  • 775
  • 1
  • 8
  • 21
  • 1
    I installed KDiff3 and GitKraken detected it with no further configuration. I used it a bit and it works for me, so my problem is solved. Anyway I leave this question here just in case someone can answer it and it helps others. – RabidTunes Apr 16 '16 at 20:18
  • When you specify meld the default merge tool (as you did in the shown gitconfig, in the `merge.tool` setting), does GitKraken properly launch meld when merging when you specify “Git Config Default” as the merge tool in GitKraken? Because that’s what’s supposed to happen. I suppose that that setting in GitKraken is a separate thing from the configured Git merge tools, and that GitKraken currently only supports a few specific tools out of the box. – poke Apr 16 '16 at 20:25

8 Answers8

16

GitKraken has finally added support for choosing one of the merge tools listed in your .gitconfig file.

enter image description here

kodybrown
  • 2,337
  • 26
  • 22
  • 1
    That’s great news! – poke Jan 11 '17 at 12:06
  • 22
    How do you get GitKraken to see other merge tools? I have the unity merge tool installed, but it's not in the list on GitKraken. – MrDysprosium Feb 10 '17 at 01:31
  • 5
    This seems to be a hard-coded list, and doesn't support just any merge tool you put in `.gitconfig`. From looking at `app.asar`, as of version 3.0.1, GitKraken only supports the following: Beyond Compare, FileMerge, Kaleidoscope, and KDiff. The "Git Config Default" option still seems to be broken. – Daniel Saner Sep 26 '17 at 07:30
  • 5
    How do you get GitKraken to see Beyond Compare? It's installed, SourceTree sees it, `git mergetool` sees it, but GitKraken doesn't list it as an option. – Roman Starkov Jan 16 '18 at 09:47
  • How do you get GitKraken to see Beyond Compare? In my case, it does not appear in GitKraken... – Gabriel Aug 29 '23 at 09:08
  • @DanielSaner - This seems to be a hot question. Look at the upvotes :) Can you be more specific in your comment? What is app.asar? Can you post your .config files? – Gabriel Aug 29 '23 at 09:08
8

ONly solution for GitKraken and Windows 10, which I can use:

Filename: C:\Users\my-name\.gitconfig

Content:

[user]
    email = bart@kassaku.nl
    name = Bart Houkes
[merge]
    tool = meld
[mergetool "meld"]
    path = C:/Program Files (x86)/Meld/Meld.exe
    cmd = \"C:/Program Files (x86)/Meld/Meld.exe\" --diff \"$BASE\" \"$LOCAL\" \"$REMOTE\" --output \"$MERGED\"
Bart Mensfort
  • 995
  • 11
  • 21
4

For meld on Linux:

[merge]
    tool = meld

[mergetool]
    keepBackup = false

[mergetool "meld"]
    path = /usr/bin/meld
    cmd = '/usr/bin/meld' --diff $BASE $LOCAL $REMOTE --output $MERGED
    trustExitCode = false
Jonathan Hult
  • 1,351
  • 2
  • 13
  • 19
  • Hey, never saw the keepBackup option, could you explain a bit the effects, and the reason why you added it? – itMaxence Feb 07 '19 at 16:40
  • 1
    From [here](https://git-scm.com/docs/git-config#git-config-mergetoolkeepBackup): `After performing a merge, the original file with conflict markers can be saved as a file with a .orig extension. If this variable is set to false then this file is not preserved. Defaults to true (i.e. keep the backup files).` – Jonathan Hult Feb 08 '19 at 17:27
3

It seems that as of right now, GitKraken does not fully support all merge tools configured with git-config right now.

In a comment to one of Axosoft’s blog posts about GitKraken, this was discussed:

A User (February 29, 2016)

Any news when using a mergetool works? Is this yet missing or just bugged? I've configured a working mergetool in git global and it works calling it from console but gitkraken just does nothing when clicking "open in mergetool", not even an error message.


James (mod) (March 3, 2016)

There is a known issue with not being able to find the mergetool set and this will be addressed in an upcoming update!

(For some reason, the Disqus plugin on that blog is not loading correctly right now, so you cannot see those comments. I had to look at a cached version from Google to see that)

So it seems that you will have to wait until a future update for GitKraken to support meld or other merge tools (I also tested Beyond Compare on my machine). If KDiff3 works for you, then I guess you’re lucky and you can use that for the time being.

poke
  • 369,085
  • 72
  • 557
  • 602
3

I had the same issue with meld as gitkraken external tool on ubuntu. I resolve that by symbolic link kdiff3 which point on meld binary. gitkraken support kdiff3.

Maybe it will work in the same way on windows. Try to rename meld.exe to kdiff3.exe or make shortcut and add to PATH. Marcin

2

I had the same problem. Try this in .gitconfig

[merge]
    tool = meld
[mergetool "meld"]
    cmd = "C:\\\\Program Files (x86)\\\\Meld\\\\Meld"

Cheers

afrischk
  • 348
  • 3
  • 11
  • In the last update GitKraken team added their own mergetool to the application so I switched to it, but thanks for the advice! I will use it if GitKraken's own mergetool becomes less useful – RabidTunes May 13 '16 at 08:50
  • 6
    GitKraken's in-app merge tool does not let you edit code before merging whereas kdiff3 does. My 2c – Kunal Aug 11 '16 at 13:01
  • @Kunal It does (now) if you upgrade to the Pro version. – Daniel Saner Jul 19 '17 at 09:48
  • 1
    Their tool doesn't even do inline change highlighting, and yeah, its for the paid version. – Ran Sagy Aug 07 '17 at 09:02
2

for users of diffmerge, this addition to my ~/.gitconfig works for me:

[merge]
tool = diffmerge
[mergetool "diffmerge"]
path = /usr/bin/diffmerge
cmd = /usr/bin/diffmerge \"$LOCAL\" \"$BASE\" \"$REMOTE\" -result \"$MERGED\"
buzz
  • 21
  • 1
0

just wanna update some... In my case, I installed KDiff3, Beyond Compare & Meld with reboot my window 10 as well. But I still didn't get the option in the dropdown box. But I realized I actually installed to my Z drive(which is my SSD drive I use for programming tools).

So I tried to remove and install back (KDiff3) to the default path C:\Program Files\KDiff3

Guess what? I had finally got it into the dropdown list. I didn't try out the other 2, but I guess It may happen when you installed to (maybe) the other drive or path.

Leo Vun
  • 36
  • 5