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

 

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

posted on 2015-09-16 14:15  橘子季节  阅读(921)  评论(0编辑  收藏  举报