2

我想将我的 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

你能告诉我我做错了什么吗?

4

1 回答 1

1

改用这个

git config --global diff.tool diffmerge
git config --global difftool.diffmerge.cmd "diffmerge \$LOCAL \$REMOTE"

有很多博客文章和文章解释了如何将 diffmerge 配置为默认的 diff 或合并工具。参见http://adventuresincoding.com/2010/04/how-to-setup-git-to-use-diffmerge/例如

于 2014-02-04T18:55:21.563 回答