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

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

相关文章:

  • 2021-09-18
  • 2022-12-23
  • 2021-07-02
  • 2021-10-02
  • 2021-10-02
  • 2021-07-07
猜你喜欢
  • 2022-03-05
  • 2021-06-25
  • 2021-08-03
  • 2022-01-05
  • 2021-07-25
  • 2021-04-03
相关资源
相似解决方案