超越比较4在已经运行的OSX上作为git difftool失败

时间:2016-02-03 10:52:45

标签: git macos beyondcompare git-difftool beyondcompare4

我最近在OSX上转而使用Beyond Compare作为我的git difftool / mergetool。当Beyond Compare 已经在运行时,它工作正常 - git difftool A B按预期工作,左侧窗格中显示A,右窗格中显示B.

但是,如果Beyond Compare会话已打开,则相同的命令会导致左侧页面显示/Applications/Beyond Compare.app/Contents/Info.plist,右侧窗格显示为空白。这非常烦人,因为我必须完全退出BC才能使下一个difftool会话正常工作,我还使用BC作为SFTP客户端来与远程服务器同步文件。

我正在使用Beyond Compare 4.1.2,git 2.6.3,OSX 10.11

我的〜/ .gitconfig的相关部分(取自Scooter Software):

[diff]
    tool = bcomp
[difftool]
    prompt = false
[difftool "bcomp"]
    trustExitCode = true
    cmd = "/usr/local/bin/bcomp" "$LOCAL" "$REMOTE"
[merge]
    tool = bcomp
[mergetool]
    prompt = false
    keepBackup = false
[mergetool "bcomp"]
    trustExitCode = true
    cmd = "/usr/local/bin/bcomp" "$LOCAL" "$REMOTE" "$BASE" "$MERGED"

其中/usr/local/bin/bcomp -> /Applications/Beyond Compare.app/Contents/MacOS/bcomp

有人可以建议解决方案吗?

2 个答案:

答案 0 :(得分:1)

尝试使用Scooter Software知识库中的更新说明。

启动Beyond Compare,转到Beyond Compare菜单并运行Install Command Line Tools。

<强> DIFF

git config --global diff.tool bc3

要使用Beyond Compare启动差异,请使用以下命令:git difftool file.ext

合并(仅限专业版)

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

要使用Beyond Compare启动3向合并,请使用以下命令:git mergetool file.ext

我使用BC 4.1.3,OS X 10.11和Git 2.5.4测试了上述说明,并从Beyond Compare中打开的单独终端启动了两个“git difftool file.ext”,没有问题。

参考:this

答案 1 :(得分:0)

我不得不另外打开BC4并转到Session Settings > Handling,然后

  1. 打开Follow Symbolic Links复选框
  2. 在左下角,将Use for this view only设置为Also update session defaults的下拉列表

来自以下踏板车支持线程:https://www.scootersoftware.com/vbulletin/forum/beyond-compare-4-discussion/mac/11149-git-difftool-dir-diff-not-working-with-bc4-on-os-x