这两天花了点时间最终在Window和Mac上把Beyong Compare和git整合好。当中遇到到非常多坑,如今把这些都分享出来。希望对大家有帮助。
首先如果你已经装好了Beyong Compare。
然后在~/bin/文件夹下新建一个git-diff-wrapper.sh
window系统的git bash的git-diff-wrapper.sh
#!/bin/sh
# diff is called by git with 7 parameters:
# path old-file old-hex old-mode new-file new-hex new-mode
"D:/tools/Beyond Compare 2/BC2.exe" "$2" "$5" | cat
mac系统的git-diff-wrapper.sh 
#/bin/sh
# diff is called by git with 7 parameters:
# path old-file old-hex old-mode new-file new-hex new-mode
bcompare "$2" "$5"|cat
注意:你在mac系统中装了beyong compare后须要在菜单条点击“Install Command Line Tools”把它增加到命令行。
Beyond Compare Pro for Mac 4.0.2 破解版下载

在用户文件夹~下改动.gitconfig文件

[user]
name = hudashi
email = hudashi@gmail.com
[diff]
external = ~/bin/git-diff-wrapper.sh
最后就git diff就ok了。
注意:我们在Mac上执行git diff时,因为系统要保存历史文件到暂时文件夹再进行比較,而在保存到暂时文件夹又须要非常高的权限。所以我在git  diff前加了sudo才干执行成功。即sudo
git diff.
关于git diff的很多其它内容请參考《git
diff简单介绍

最新文章

  1. QT QString 很全的使用 (转)
  2. 1.2 基础知识——关于猪皮(GP,Generic Practice)
  3. IOS QuartzCore核心动画框架
  4. VS中的预先生成事件和后期生成事件
  5. poj 2038 Team Rankings 枚举排列
  6. 跨语言时区处理与Epoch
  7. 【Atom】在一个中/大型项目中,那些好用而强大的atom功能
  8. 【java】多线程同步死锁
  9. openvpn服务器一键脚本生成客户端文件
  10. mobile_轮播图_style_left 版本
  11. springboot(@Service,@Mapper)注解失效导致无法注入service和mapper
  12. echarts背景分割区域填充不同颜色(x轴为time),实时刷新
  13. CentOS 6.9 下安装DB2
  14. c/c++ json使用
  15. Git操作指令
  16. AI:人工智能搜索策略
  17. Android基础总结(七)BroadcastReceiver
  18. ADT安装Genymotion的eclipse插件安装及错误解决办法
  19. 天津Uber优步司机奖励政策(12月28日到12月29日)
  20. jinkens 检查svn更新就构建

热门文章

  1. Eclipse:The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path
  2. CMoLineMgr
  3. 【实例图文详解】OAuth 2.0 for Web Server Applications
  4. OpenShift跨版本升级
  5. 百度、淘宝、腾讯三大巨头HTML页面有何高招?
  6. Vue.js前后端同构方案之准备篇——代码优化
  7. [ES6] 03. The let keyword -- 1
  8. CSDN日报20170404 ——《不不过写代码,而是完毕作品》
  9. 委托批量处理Excel
  10. 导入exce表格中的数据l到数据库