设置 Beyond Compare 为 Git(1.8+) 对比工具

先安装 Beyond Compare,我 Mac 上用的是 Version 4.2.3 (build 22587)

再配置 Beyond Compare 命令行工具:Beyond Compare -> Install Command Line Tools -> 填写电脑密码 -> Successfully installed command line tools. -> OK。此时可以用 bcomp file1 file2 比较文件了。

最后配置 git 对比工具:

// Use bc3 on the command line for both BC version 3 and 4

// Diff Confirm that "bcompare" can be launched from Terminal. Then in a console window enter:
$ git config --global diff.tool bc3
$ git config --global difftool.bc3.trustExitCode true
// To launch a diff using Beyond Compare, use the command "git difftool file.ext".

// Merge Confirm that "bcompare" can be launched from Terminal. Then enter the following:
git config --global merge.tool bc3
git config --global mergetool.bc3.trustExitCode true
// To launch a 3-way merge using Beyond Compare, use the command "git mergetool file.ext".

// option
// git config --global difftool.prompt false

快在终端里键入 git difftool 看看效果吧。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • SVN & Git PS:本文所有$符号之后为在终端中执行的命令。 版本控制系统 版本控制 版本控制(Versi...
    羊驼先生丶阅读 3,538评论 1 7
  • PS:本文所有$符号之后为在终端中执行的命令。 版本控制系统 版本控制 版本控制(Version Control)...
    clarkx阅读 2,563评论 0 5
  • Week 1 Jan 9th Intro to Linux What's an OS? OS services ...
    请叫我小妖阅读 2,844评论 0 2
  • 自从转到iOS开发之后一直都是单枪匹马, 基本上不存在代码冲突问题, 最近来了个帮手,代码冲突是不可避免的, 之前...
    lxb0706阅读 12,303评论 0 10
  • 有扶门习惯,是一个人教养的体现。 得到扶门礼遇,道声“谢谢”是基本礼节。 如果一个人存有礼节理念,那么在得到别人“...
    烟花talk烫阅读 4,012评论 2 3

友情链接更多精彩内容