Skip to content

Instantly share code, notes, and snippets.

@r3code
Last active June 22, 2020 09:34
Show Gist options
  • Save r3code/9939178be7ca83755f4b5b93d8a02325 to your computer and use it in GitHub Desktop.
Save r3code/9939178be7ca83755f4b5b93d8a02325 to your computer and use it in GitHub Desktop.
Gitconfig to set Mela as default diff and mergetool for git
diff]
tool = meld
[difftool]
prompt = false
[difftool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args \"$LOCAL\" \"$PWD/$REMOTE\"
[merge]
tool = meld
[mergetool]
prompt = false
[mergetool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"
@r3code
Copy link
Author

r3code commented Jun 22, 2020

Must use $PWD in command or Meld can't find any file being merged

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