使用DiffMerge作为默认的git diff GUI工具

P4Merge: 界面美观,功能强大,安装包大(100M)

DiffMerge: 界面简单,功能一般,安装包小(10M)

配置方法

1
2
3
4
5
6
$ git config --global merge.tool diffmerge
$ git config --global mergetool.diffmerge.cmd "/Applications/DiffMerge.app/Contents/MacOS/diffmerge --merge --result=\$MERGED \$LOCAL \$BASE \$REMOTE"
$ git config --global mergetool.keepBackup false

$ git config --global diff.tool diffmerge
$ git config --global difftool.diffmerge.cmd "/Applications/DiffMerge.app/Contents/MacOS/diffmerge \$LOCAL \$REMOTE"

使用方法

1
$ git difftool

参考链接:Configure DiffMerge for Your Git DiffTool