首先輸入下述指令查看自己的git版本支持哪些工具
git difftool --tool-help
git mergetool --tool-help
bc3,bc4,代表的就是beyond compare,如果沒有的話就升級git版本吧
git bash中輸入下述指令,換成你自己的文件路徑,注意是BComp.exe不是BCompare.exe
git config --global diff.tool bc4
git config --global difftool.bc4.cmd '"E:\Program Files\Beyond Compare\BComp.exe" "$LOCAL" "$REMOTE"'
git config --global merge.tool bc4
git config --global mergetool.bc4.cmd '"E:\Program Files\Beyond Compare\BComp.exe" "$LOCAL" "$REMOTE"'
之后只需要在gitbash中輸入git difftool,就能自動打開beyond compare顯示差異的文件
git difftool
但假如你文件夾里代碼很多的話,beyond compare不會一起給你打開,而是一個一個打開,關(guān)掉一個,他再給你彈出來一個窗口,非常麻煩
git difftool --dir-diff
只需輸入上述指令,就會比較整個文件夾的差異,哪些文件做過更改就會標(biāo)紅顯示出來
?這時再想看哪個文件的差異,直接雙擊就會新建一個標(biāo)簽頁顯示文章來源:http://www.zghlxwxcb.cn/news/detail-570746.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-570746.html
到了這里,關(guān)于使用beyond compare比較git版本差異的配置和使用方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!