git設置對比工具


windows下設置 beyond compare 3 為 git  的對比工具。

首先需要先安裝 beyond compare 3 工具,切記需要安裝安裝版的,不要搞綠色版的。

mac下使用 Kaleidoscope,具體步驟請看 http://www.cnblogs.com/ayseeing/p/4453685.html

 

git查看有哪些對比工具可以設置命令:

$ git difftool --tool-help

  

然后再設置對不工具,如:

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

  

設置默認的合並工具設置和對比工具類似:

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

  

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

[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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM