【问题标题】:How to configure Visual Studio to use Beyond compare for TFS GIT?如何配置 Visual Studio 以将 Beyond compare 用于 TFS GIT?
【发布时间】: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


【解决方案1】:

一个选项是按照编辑 .git/config 来配置差异工具,如下所述: http://www.scootersoftware.com/support.php?zz=kb_vcs#visualstudio-git

【讨论】:

  • 我不得不进行一些调整,但让它起作用了:首先,步骤 1..4 与我的 VS 2017 Enterprise 不匹配,将“Git”作为我的“插件选择”。我能够跳过/忽略这些步骤。编辑“.git 文件夹中的配置文件...”时,必须更正路径。我的 BComp.exe 在“程序文件”而不是“程序文件 (x86)”中。
  • 对于我们这些使用 Windows 的人来说,这是 .git\config,他们早上的大脑会看到正斜杠并将其读作“或”而不是目录分隔符。
  • 我会注意到您提供的链接还包含其他源代码控制系统的说明,除了 git,以及如何导航复杂的 Visual Studio UI,这似乎是为了让这变得困难..跨度>
【解决方案2】:

配置用户工具仅适用于 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

【讨论】:

【解决方案3】:

按照那里的说明进行操作(标题 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\"

【讨论】:

猜你喜欢
  • 2012-10-29
  • 2013-10-28
  • 1970-01-01
  • 2014-04-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-09-20
  • 1970-01-01
相关资源
最近更新 更多