一, 安装Git

1, 打开 C:\Users\xxx\.gitconfig, 加入

[diff]
tool = bc4
[difftool]
prompt = true
[difftool "bc4"]
cmd = \"D:/alexSoft/BeyondCompare4/BComp.exe\" "$(cygpath -w $LOCAL)" "$REMOTE"
[merge]
tool = bc4
[mergetool]
prompt = true
keepBackup = false
[mergetool "bc4"]
#trustExitCode = true
cmd = \"D:/alexSoft/BeyondCompare4/BComp.exe\" "$LOCAL" "$REMOTE" "$BASE" "$MERGED"


二, 测试

        1, 制造a.py合并冲突

 Windows之使用Beyond解决Git冲突_Merge


         2, 使用 git mergetool 命令打开Beyond Compare

 Windows之使用Beyond解决Git冲突_Git_02

          3, 解决冲突

 Windows之使用Beyond解决Git冲突_Git_03