Skip to content

Instantly share code, notes, and snippets.

@sirkuttin
Last active October 17, 2024 20:04
Show Gist options
  • Save sirkuttin/5f995f35169456500a3eb7365df5204c to your computer and use it in GitHub Desktop.
Save sirkuttin/5f995f35169456500a3eb7365df5204c to your computer and use it in GitHub Desktop.
Gitkraken can use the Git Config Default merge and diff tool. This allows you to right click a file and "open external diff tool". I like meld the best for this. This works for git command line and should work for more than just GitKraken.

First, Download and install the newest version of Meld for Windows. https://download.gnome.org/binaries/win32/meld/

Next we need to edit your .gitconfig file. This file lives as a hidden file in your user directory. Here is a sample of mine:

[user]
	email = [email protected]
	name = Sir Kuttin
[merge]
	tool = meld
[diff]
	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\"

Once this is done, you can go to Gitkraken's Preferences and set up the merge and diff tool to use the GitConfig Default. This also allows meld to be used for git command line and should also work with other Git GUIs.

@stringinator
Copy link

Excellent! Worked perfectly, thanks!!

@nlachancedev
Copy link

Worked!

@kolosovpetro
Copy link

Does not work for me. Fresh install of GitKraken

  • OS: Windows 10 Education 21H2 19044.1586

@bvandenbon
Copy link

worked perfectly for me.
configured CompareIt! tool as follows:

[diff]
	tool=wincmp3
[difftool "wincmp3"]
    cmd = \"C:\\Program Files (x86)\\Compare It!\\wincmp3.exe\" \"$REMOTE\" \"$LOCAL\"
	trustExitCode = true

Not sure if the trustExitCode = true is necessary tbh. But got that from other places.

@jerome-diver
Copy link

what if Linux OS and meld diff tool installed with flatpak (command is flatpak run org.gnome.meld) ?

@StuYarrow
Copy link

I spent quite a long time trying to get this to work, and this is what I ended up with. Note that I am using 64-bit Meld.

[merge]
	tool = meld
[diff]
	tool = meld
[mergetool "meld"]
	cmd = \"C:\\Program Files\\Meld\\Meld.exe\" --diff \"$LOCAL\" \"$BASE\" \"$REMOTE\" --output \"$MERGED\"
[difftool "meld"]
	cmd = \"C:\\Program Files\\Meld\\Meld.exe\" --diff \"$REMOTE\" \"$LOCAL\"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment