我想设置我的git使用diffmerge
作为默认的差异编辑器而不是默认的Unix diff
:
git config --global diff.external diffmerge
很遗憾,当我做的时候
git diff myfile.txt
我从DiffMerge中获得了以下错误(以弹出窗口的形式):
Unexpected parameter '100644'
Command Line Arguments:
[0]: /Applications/DiffMerge.app/Contents/MacOS/DiffMerge
[1]: --nosplash
[2]: myfile.txt
[3]: /var/folders/_r/xjwgmj811yq5x7n7mb9z0pzc0000gn/T//pNIOTmyfile.txt
[4]: 95cbe334d3ec607ca7f7bd3fd16d630271e9d0af
[5]: 100644
[6]: myfile.txt
[7]: 0000000000000000000000000000000000000000
[8]: 100644
你能说出我做错了吗?
答案 0 :(得分:1)
改为使用
git config --global diff.tool diffmerge
git config --global difftool.diffmerge.cmd "diffmerge \$LOCAL \$REMOTE"
有很多博客文章和文章解释了如何将diffmerge配置为默认差异或合并工具。例如,请参阅http://adventuresincoding.com/2010/04/how-to-setup-git-to-use-diffmerge/