码迷,mamicode.com
首页 > 其他好文 > 详细

git difftool和mergetool图形化

时间:2018-09-23 11:49:55      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:base   glob   cmd   compare   git merge   tool   als   merge   fft   

1.当然是先安装Beyond Compare3 (此处省略安装步骤,自行百度)

 

2.设置difftool

git config --global diff.tool bc3

git config --global difftool.bc3.path "/usr/bin/bcompare

git config --global difftool.prompt false

 

3.设置mergetool

git config --global merge.tool bc3

git config --global mergetool.bc3.path "/usr/bin/bcompare"

git config --global mergetool.bc3.trustExitCode true

____________________________________________________________________________________________

Windows git difftool和mergetool图形化
1.当然是先安装Beyond Compare3 (此处省略安装步骤,自行百度)

 

2.设置difftool

git config --global diff.tool bc3
git config --global difftool.bc3.cmd "\"c:/program files/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\""
git config --global difftool.prompt false

 

3.设置mergetool

git config --global merge.tool bc3
git config --global mergetool.bc3.cmd "\"c:/program files/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""
git config --global mergetool.bc3.trustExitCode true

____________________________________________________________________________________________


使用时:

diff时,用git difftool <file_name>来查看就会直接弹出bcompare.

merge时,要先用git merge <branch_name> 来merge一下,然后如果提示merge有冲突,才用git mergetool来调用bcompare来merge

---------------------

git difftool和mergetool图形化

标签:base   glob   cmd   compare   git merge   tool   als   merge   fft   

原文地址:https://www.cnblogs.com/jxldjsn/p/9691902.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!