meld作为mergetool
修改本地的~/.gitconfig
配置文件,加入以下几行配置
[merge]
tool = meld
conflictstyle = diff3
[mergetool "meld"]
cmd = meld $LOCAL $BASE $REMOTE --output=$MERGED --auto-merge
meld作为diff工具
vim /usr/bin/git_meld.sh 写入以下内容
#!/bin/sh
meld $2 $5
然后执行
chmod +x ~/bin/git_meld.sh
git config --global diff.external ~/bin/git-meld.sh