【发布时间】:2017-08-07 07:24:05
【问题描述】:
在使用 Git 时,在 Visual Studio 2015/2017 中进行“与未修改的比较”时,有没有办法使用 Beyond Compare 作为默认比较工具?
我没有找到中所述的“配置用户工具”选项 How to configure Visual Studio to use Beyond Compare.
【问题讨论】:
标签: git visual-studio tfs beyondcompare
在使用 Git 时,在 Visual Studio 2015/2017 中进行“与未修改的比较”时,有没有办法使用 Beyond Compare 作为默认比较工具?
我没有找到中所述的“配置用户工具”选项 How to configure Visual Studio to use Beyond Compare.
【问题讨论】:
标签: git visual-studio tfs beyondcompare
一个选项是按照编辑 .git/config 来配置差异工具,如下所述: http://www.scootersoftware.com/support.php?zz=kb_vcs#visualstudio-git
【讨论】:
配置用户工具仅适用于 Visual Studio Team Foundation Server 源代码管理插件。不适用于 GIT 源代码控制插件。
由于 Visual Studio Git 插件使用标准 git 配置,因此您的本地存储库可能没有任何特定的 diff 和合并工具(除非您配置了它们),因此可以使用全局设置。
要验证实际设置,您可以在存储库中打开 Git Bash, 发出 git config –list 命令 并 查看 merge.tool 和 diff.tool 设置
这里尝试改一下,更多方法请看这个博客:How to configure diff and Merge tool in Visual Studio Git Tools
【讨论】:
按照那里的说明进行操作(标题 Visual Studio with Git for Windows 的答案) How to configure Visual Studio to use Beyond Compare
关于我可以添加的重要信息: 更改 Windows \user\ 文件夹中的 .gitconfig 而不是在 repos 或 VS 中的 gitconfig 文件之一。这将防止在更新 VS 时覆盖。
[diff]
tool = bc4
[difftool "bc4"]
cmd = \"C:\\Program Files\\Beyond Compare 4\\BCompare.exe\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = bc4
[mergetool "bc4"]
cmd = \"C:\\Program Files\\Beyond Compare 4\\BCompare.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"
【讨论】:
BCompare.exe 时遇到问题,使用BComp.exe 有效。 BC网站也使用BComp.exe:scootersoftware.com/support.php?zz=kb_vcs#visualstudio-git