使用 bc4 解决 git 合并冲突问题

发布时间 2023-09-01 18:03:46作者: zylyehuo

博客地址:https://www.cnblogs.com/zylyehuo/

STEP1:安装 beyond compare

安装地址:
https://www.scootersoftware.com/download

STEP2:查看 beyond compare 软件安装路径

STEP3:在 git 中配置(仅对当前项目有效)

git config --global merge.tool bc4
git config --global mergetool.bc4.cmd "\"beyond compare 软件安装路径\" \"\$LOCAL\" \"\$REMOTE\" \"\$BASE\" \"\$MERGED\""
# git config --global mergetool.bc4.cmd "\"D:\\Beyond Compare\\Beyond Compare 4\\Beyond Compare 4\\BCompare.exe\" \"\$LOCAL\" \"\$REMOTE\" \"\$BASE\" \"\$MERGED\""
git config --global mergetool.bc4.trustExitCode true
git config --global mergetool.keepBackup false

STEP4:应用 beyond compare 解决冲突

git mergetool