1

我已经为此苦苦挣扎了好几个小时。我只是想让 git 打开一个自定义差异工具(Win 7 64bit)。我什至不在回购中,我只是想启动它。这是我的配置:

[diff]
tool = bc3
[difftool]
prompt = false
[difftool "bc3"]
cmd = \"C:/Program Files (x86)/Beyond Compare 3/BComp.exe\" \"$LOCAL\" \"$REMOTE\"
prompt = false
[merge]
tool = bc3
[mergetool]
prompt = false
keepBackup = false
[mergetool "bc3"]
cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
trustExitCode = true

用两个测试文件执行这个命令,虽然 git bash 什么都不做,没有错误,什么也没有。

git difftool test.txt test2.txt

4

1 回答 1

0

此页面(http://www.learnphpbasics.com/php-reference/git-on-windows-how-do-you-set-up-a-mergetool.html)建议使用 Cygwincygpath来帮助解决路径差异。例子:

git config --global mergetool.fooTool.cmd 'fooTool.exe "$(cygpath -wla $BASE)" "$(cygpath -wla $LOCAL)" "$(cygpath -wla $REMOTE)" "$(cygpath -wla $MERGED)"'
于 2013-04-29T19:10:08.843 回答