用beyond compare作为Git 的diff 以及 merge工具

 
BC官方支持: http://www.scootersoftware.com/support.php?zz=kb_vcs#gitwindows
GIT FOR WINDOWS
BC4 logo BC version 4
Diff
At a Windows command prompt enter the commands:
  git config --global diff.tool bc3
  git config --global difftool.bc3.path "c:/Program Files (x86)/Beyond Compare 4/bcomp.exe"

Note: Git versions older than 2.2.0 (git --version) use "bc3" as the keyword for BC4. For Git 2.2.0+, use "bc". To launch a diff using Beyond Compare, use the command "git difftool foofile.txt".

3-way Merge Pro only
At a Windows command prompt, enter the commands:
  git config --global merge.tool bc3
  git config --global mergetool.bc3.path "c:/Program Files (x86)/Beyond Compare 4/bcomp.exe"

Note: Git versions older than 2.2.0 (git --version) use "bc3" as the keyword for BC4. For Git 2.2.0+, use "bc". To launch a 3-way merge using Beyond Compare, use the command "git mergetool foofile.txt".

 

当安装以上设置配置好后,采用gifftool即可打开beyond compare进行对比

git difftool <file>

 

请注意,不是 git diff. git diff 仅是---,++++文字性格式的对比。

 

另外,如果想使用beyond compare比较两个分支的差异, 可以加上参数--dir-dif

git difftool --dir-dif master dev  &

The details refer to http://stackoverflow.com/questions/3365933/getting-beyond-compare-to-diff-2-branches-simultaneously

 

&是指后台运行。方便做其他操作

转载于:https://www.cnblogs.com/orangeseason/p/4813218.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值