标签:Beyond Compare

共 1 篇相关文章

IT 累计浏览 1,980

git diff(merge) with beyond compare

在 Mac 上使用 Beyond Compare 作为 git 的 diff/merge 工具,首先需要在软件里安装命令行支持,安装后会得到 /usr/local/bin/bcomp(等待比较完成)和 /usr/local/bin/bcompare(立即返回)两个命令。配置 diff 工具和 merge 工具几乎没有差别,本文以 diff 为例。

通过 git difftool --tool-help 可以查看 git 支持的 diff 工具列表,其中 bc 和 bc3 就对应 Beyond Compare(git 并未内置这些工具,只是自带了相关配置);另一批工具虽然有效但当前不可用,因为它们需要图形窗口环境。除了通过 git difftool -t vimdiff 这样的命令行参数直接指定工具外,还可以用 -x 选项指定自定义命令来接入 git 未内置支持的比较工具。具体配置方式可参考 git difftool -help。