【问题标题】:Setting up Beyond Compare in Visual Studio 2013 when using Git使用 Git 时在 Visual Studio 2013 中设置 Beyond Compare
【发布时间】:2013-10-28 00:07:44
【问题描述】:

How to configure Visual Studio to use Beyond Compare 为如何配置 Visual Studio 以使用 Beyond Compare 提供了很好的答案。但是,这些步骤的 UI 在 Visual Studio 2013 中发生了变化。部分原因可能是我将 Git 用于我的 SCM,而 VS 2013 现在具有原生 Git 支持。

有人知道如何配置 VS 2013 以使用 Beyond Compare 吗?

【问题讨论】:

  • 我正在寻找适用于 VisualSVN 的解决方案。我终于发现我可以禁用 VisualSVN 选项中的内部差异/合并工具。是否有某种单独的 Git 菜单,您可以访问它自己的选项?

标签: git visual-studio-2013 beyondcompare3


【解决方案1】:

至少对于 VS 2012,您实际上可以从 Scooter 网站上显示的命令提示符进行更新。 http://www.scootersoftware.com/support.php?zz=kb_vcs#gitwindows

如果你使用 VS 中的配置用户工具安装了 msysgitVS,你的 Git 路径可能是:

C:\Program Files (x86)\Git\cmd\git.exe

对于 Git 1.7.6 及更高版本,编辑全局配置文件以设置路径。在 Windows 命令提示符处输入以下命令:

Beyond Compare v3 使用:

git config --global diff.tool bc3

git config --global difftool.bc3.path "c:/program files (x86)/beyond compare 3/bcomp.exe"

如果您有 PRO 许可证,还有这些:

git config --global merge.tool bc3

git config --global mergetool.bc3.path "c:/program files (x86)/beyond compare 3/bcomp.exe"

然后在 Visual Studio 中进行比较时,它将使用 BeyondCompare。


Beyond Compare v4 使用:

git config --global diff.tool bc4

git config --global difftool.bc4.cmd "\"c:/program files (x86)/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\""

git config --global merge.tool bc4

git config --global mergetool.bc4.cmd "\"c:/program files (x86)/beyond compare 4/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE \" \"$MERGED\""

git config --global mergetool.bc4.trustExitCode true

【讨论】:

  • 这在 VS2012 中与 Microsoft Git 提供程序测试版一起工作,但在 VS2013 RTM 中不起作用。
  • @BrianReiter:应该,它是相同的代码。如果没有,请提交一个 Connect 错误。
  • +1 非常适合使用 Git 1.8.4 tyvm 的 VS2013 Update 1 的差异和合并
  • 这不会影响现有的存储库。为此,请打开 Git Bash,将目录 (cd) 更改为存储库,并在不带“--global”的情况下执行上述命令。我在 VS2012 上执行此操作,无需重新启动 Visual Studio。
  • @Zodman 你的技巧在 VS2013 下的现有仓库中对我有用。谢谢!
【解决方案2】:

我看到了您的 BeyondCompare 集成并提高了您的自动合并功能。 相信我,如果您要合并大量文件,您会希望启用自动合并选项 :)

[diff]
        tool = bc3
[difftool]
        prompt = false
[difftool "bc3"]
        path = /c/Program Files (x86)/Beyond Compare 3/BComp.exe
[merge]
        tool = bc3
[mergetool]
        prompt = false
        keepBackup = false
[mergetool "bc3"]
        cmd = /c/Program Files (x86)/Beyond Compare 3/BComp.exe -automerge -ignoreunimportant -reviewconflicts "$LOCAL" "$REMOTE" "$BASE" "$MERGED" 
        trustExitCode = true

【讨论】:

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