git设置对比工具

windows下设置 beyond compare 3 为 git  的对比工具。

首先需要先安装 beyond compare 3 工具,切记需要安装安装版的,不要搞绿色版的。

mac下使用 Kaleidoscope,具体步骤请看 http://www.cnblogs.com/ayseeing/p/4453685.html

 

git查看有哪些对比工具可以设置命令:

1
$ git difftool --tool-help

  

然后再设置对不工具,如:

1
2
$ git config --global diff.tool bc3
$ git config --global difftool.bc3.path "c:/program files/beyond compare 3/bcomp.exe"

  

设置默认的合并工具设置和对比工具类似:

1
2
$ git config --global merge.tool bc3
$ git config --global mergetool.bc3.path "c:/program files/beyond compare 3/bcomp.exe"

  

也可以直接修改.gitconfig文件,直接增加如下:

1
2
3
4
5
6
7
8
[diff]
    tool = bc3
[difftool "bc3"]
    path = d:/program files/beyond compare 3/bcomp.exe
[merge]
    tool = bc3
[mergetool "bc3"]
    path = d:/program files/beyond compare 3/bcomp.exe

  具体地址根据个人电脑配置。

 

设置好后,使用命令是 git difftool 而不是之前的 git diff 了。

 

git difftool说明文档:http://git-scm.com/docs/git-difftool.html

posted @   破男孩  阅读(14468)  评论(0编辑  收藏  举报
编辑推荐:
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
阅读排行:
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
点击右上角即可分享
微信分享提示