首页 > 其他 > 详细

git difftool和mergetool图形化

时间:2018-09-23 11:06:46      阅读:182      评论:0      收藏:0      [点我收藏+]

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图形化

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!