When there\'s a collison during git merge
, I open a mergetool called Meld. It opens three files LOCAL, BASE and REMOTE. As I\'ve read LOCAL is my local branch,
I found that none of the default files shown was being saved.
meld was showing $LOCAL
, $REMOTE
and $BASE
by default. To make it work, I needed to make meld show $MERGED
instead of $BASE
. Putting this in my ~/.gitconfig
fixed it for me:
[merge]
tool = mymeld
[mergetool "mymeld"]
cmd = meld "$LOCAL" "$MERGED" "$REMOTE"
I'm using Arch, with:
$ git --version
git version 1.8.2
$ meld --version
meld 1.7.1
Please see Saad's answer for the correct answer.
With meld 1.8.1 on Ubuntu I was getting the
wrong number of arguments supplied to --diff
and adding the --output before $MERGED fixed it for me:
[mergetool "mymeld"]
cmd = meld --diff $BASE $LOCAL --diff $BASE $REMOTE --diff $LOCAL $BASE $REMOTE --output $MERGED