gpt4 book ai didi

git difftool 不会启动 Beyond Compare

转载 作者:太空狗 更新时间:2023-10-29 13:25:30 25 4
gpt4 key购买 nike

我正在努力使用 git 使 run Beyond Compare 作为我的 difftool。

我正在使用“Git For Windows”、Windows 7 32 位和 Beyond Compare 4

$ git --version
git version 1.9.5.msysgit.1
$ git config --list

[diff]
tool = bc3

[difftool "bc3"]
path = c:/Program Files/Beyond Compare 4/bcomp.exe

[merge]
tool = bc3

[mergetool "bc3"]
path = c:/Program Files/Beyond Compare 4/bcomp.exe

现在我在这里和那里阅读了其他问题,并按照以下说明进行操作:

  • 用其他名称更改“bc3”,即“abc3”或“beyondcompare”
  • 命令:git difftool --tool=bc3 MyFile.java
  • 将 .gitconfig 中的“bc3”路径更改为“c:\Program Files\Beyond Compare 4\bcomp.exe”
  • 添加 $LOCAL $REMOTE 到路径

我意识到,尽管传递了上述参数“--tool=bc3”或“--tool=anyname”,但它总是启动默认的 diff 控制台查看器/工具(如果我没记错的话是 vimdiff) , 到 'git difftool' 命令。

最后,它只适用于 'git mergetool' ,在这种情况下,beyond compare 被启动并且你可以看到参数是相同的。

如果我忘记了什么或需要更多详细信息,请告诉我谢谢

“当我输入命令git difftool”

image

最佳答案

要将 Beyond Compare 4 配置为 Git for Windows 1.9.5 中的外部差异工具,请按照 Scooter Software 的 Using Beyond Compare with Version Control Systems 上的说明进行操作。页面。

按照配置说明在 Beyond Compare 中比较文件:

git difftool filename.ext

如果仍然不起作用,请验证您在 c:\users\username\.gitconfig 文件中的设置是否正确:

[diff]
tool = bc3
[difftool "bc3"]
path = c:/program files/beyond compare 4/bcomp.exe
[merge]
tool = bc3
[mergetool "bc3"]
path = c:/program files/beyond compare 4/bcomp.exe

如果仍然不能解决问题,请确保您在 .git\config 中没有特定于存储库的设置覆盖全局设置。

关于git difftool 不会启动 Beyond Compare,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31333986/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com