git difftool for mac

来源:互联网 发布:海报设计 知乎 编辑:程序博客网 时间:2024/06/18 15:32

DiffMerge轻量级代码比较框架
https://sourcegear.com/diffmerge/downloads.php

参考

http://quding0308.iteye.com/blog/1969831

注意问题:
1、下载时要下载:Download the DiffMerge OS X installer
2、在command中执行命令:

git config --global diff.tool diffmergegit config --global difftool.diffmerge.cmd 'diffmerge "$LOCAL" "$REMOTE"'git config --global merge.tool diffmergegit config --global mergetool.diffmerge.cmd 'diffmerge --merge --result="$MERGED" "$LOCAL" "$(if test -f "$BASE"; then echo "$BASE"; else echo "$LOCAL"; fi)" "$REMOTE"'git config --global mergetool.diffmerge.trustExitCode true

or
修改~/.gitconfig文件,如下所示(请按需配置):

[diff]         tool = diffmerge  [difftool "diffmerge"]         cmd = /usr/bin/diffmerge \"$LOCAL\" \"$REMOTE\"     [difftool]         prompt = false merge]      tool = diffmerge     [mergetool "diffmerge"]         cmd = /usr/bin/diffmerge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"         trustExitCode = true