我使用 Beyond Compare 作为我的外部差异工具。当我在 .gitconfig 中的新计算机上配置它时,它不起作用,就像我在其他计算机上所做的那样。如果我用太多引号指定 extcmd,那么它确实有效。
现在和以前的一大区别是我在我的新存储库上使用 LFS。
.gitconfig 文件:
[diff]
tool = bc4
renameLimit = 999999
[difftool]
prompt = false
[difftool "bc4"]
cmd = 'C:/Program Files/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\"
不起作用(使用单引号或双引号):
$ git difftool --extcmd='C:/Program Files/Beyond Compare 4/BComp.exe' HEAD
C:/Program Files/Git/mingw64/libexec/git-core\git-difftool--helper: line 62: C:/Program: No such file or directory
fatal: external diff died, stopping at file.cs
是否有效:
git difftool --extcmd="'C:/Program Files/Beyond Compare 4/BComp.exe'" HEAD
我怎样才能让它工作以便我可以使用
git difftool HEAD
?Git LFS 是否会导致我的问题?
我的新计算机上是否有其他错误配置导致我的问题?
我尝试将配置中的单引号 (') 更改为双引号 ("),但这也不起作用。
我在全新安装的 Windows 10 上使用 git 版本 2.29.2.windows.2。
编辑:忘记明确“不起作用”是什么意思:它没有打开 Beyond Compare,但没有错误消息。它似乎在几秒钟内什么都不做:
$ git difftool HEAD
$
我的整个 .gitconfig(以防万一):https ://hastebin.com/icuduxecen.ini