Which version of the git file will be finally used: LOCAL, BASE or REMOTE?

前端 未结 8 1435
故里飘歌
故里飘歌 2020-11-28 17:39

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,

8条回答
  •  温柔的废话
    2020-11-28 18:21

    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
    

提交回复
热议问题