如何配置Beyond与Git命令行进行比较

时间:2014-07-17 16:15:51

标签: git cygwin beyondcompare

我一直试图弄清楚在Windows上使用Git时如何通过命令行使用configure(cygwin)。 基于超越比较的文档,他们要求您使用" path"到bcomp.exe安装,一切都应该工作。但它不会自动选择" Local"," Base"和#34;远程" PARAMS。 我正在使用Beyond compare 3.0 PRO。

4 个答案:

答案 0 :(得分:11)

我通过一点点修补git配置找到了答案。 注意:我在记事本中编辑了全局git配置,这是我完成配置后的配置。希望这有助于某人。

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

答案 1 :(得分:2)

超越比较版本3.

对于Linux中的终端类型以下命令:

git config --global diff.tool bc3
git config --global difftool.prompt false
git config --global difftool.bc3 trustExitCode true

git config --global merge.tool bc3
git config --global mergetool.bc3 trustExitCode true

对于Windows类型跟随(你需​​要告诉git bcomp.exe的路径)

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

答案 2 :(得分:1)

为了让Visual Studio真正理解合并已经发生,我不得不像这样在路径上放置单引号。这适用于Windows上的Beyond Compare 4 Pro。

[diff]
    tool = bc
[difftool "bc"]
    cmd =  '"C:/Program Files/Beyond Compare 4/BComp.exe"' "$LOCAL" "$REMOTE"
[merge]
    tool = bc
[mergetool "bc"]
    cmd = '"C:/Program Files/Beyond Compare 4/BComp.exe"' "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
    trustExitCode = true
    keepBackup = false

答案 3 :(得分:0)

只需后续注释:您可以使用以下代码直接从命令行编辑配置文件。 - 它将启动命令行默认编辑器。

$ git config --global --edit

P.S。上面的提示也适用于我。我正在使用win7企业。

相关问题