0

I'm using meld as mergetool for git and I'm wondering why meld always shows three files when I run git mergetool. I would prefer to see only two files in meld (the HEAD version and the version from the other branch that I want to merge). Is it possible to configure meld so that it does the merge with only two files?

This is my current .gitconfig file:

[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\"
eztam
  • 3,443
  • 7
  • 36
  • 54
  • 1
    Could you show the output from `git mergetool` and `git status`, and possibly other things we might need to be able to help you? – Harald Nordgren Jan 07 '17 at 14:36
  • 2
    I have always found to be a great thing the 3-way merge to better understand changes made by others and easy the merge. I really don't get it why to make it's job harder... – Philippe Jan 07 '17 at 17:01
  • 1
    As @Philippe says, you probably do want to see the three files; when you're performing a 3-way merge using meld, push the changes all the way across (rather than to the center) and it'll be a bit more obvious. – ti7 Jan 07 '17 at 19:15

1 Answers1

1

Your current .gitconfig runs Meld in a three-way directory compare between $LOCAL, $BASE, and $REMOTE. If you want set this up as a two-way compare (assuming you don't want to compare against $REMOTE), simply change your config to (i.e. remove the $REMOTE command argument)

cmd = open -W -a Meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" --output=\"$PWD/$MERGED\"
Frelling
  • 3,287
  • 24
  • 27