我正在尝试解压缩一些文件,其中一个文件导致合并冲突,我试图使用Beyond Compare解决这些问题。我正在使用Windows 7。
这就是我的所作所为:
git mergetool
"*whatever*_LOCAL_21148.tex"
"*whatever*_BASE_21148.tex"
等(他们实际上也不存在)。但它
创建三个名为.merge_file_*some_hex_number*
的新文件
我可以看到包含基本版本,本地版本和远程版本。有人能指出我在这里出了什么问题吗?
我的.gitconfig:
[core]
autocrlf = true
fileeditor
eol = native
[user]
name = David Wright
email =
[diff]
tool = bc
guitool = meld
[difftool "meld"]
cmd = "C:/Program Files (x86)/Meld/Meld.exe /\"$LOCAL/\" /\"$REMOTE/\" "
prompt = false
path = C:/Program Files (x86)/Meld/Meld.exe
[merge]
tool = bc
[mergetool "meld"]
cmd = C:/Program Files (x86)/Meld/Meld.exe /\"$LOCAL/\" /\"$BASE/\" /\"$REMOTE/\" --output=/\"$MERGED/\" --auto-merge
path = C:/Program Files (x86)/Meld/Meld.exe
[difftool "sourcetree"]
cmd = 'C:/Program Files (x86)/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
cmd = 'C:/Program Files (x86)/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
trustExitCode = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
[difftool "kdiff3"]
path = C:/Program Files (x86)/KDiff3/kdiff3.exe
[http]
sslVerify = false
[difftool "bc"]
path = C:\\Program Files\\BeyondCompare\\BCompare.exe
[mergetool "bc"]
path = C:\\Program Files\\BeyondCompare\\BCompare.exe
答案 0 :(得分:2)
将bcompare.exe替换为bcomp.exe。
可执行文件bcomp.exe打开每个diff并在单独的帮助程序进程中合并,允许版本控制检测比较何时完成。
如果使用bcompare.exe,则会在一个进程中打开所有比较。如果在启动新比较时bcompare.exe已在运行,则比较将传递到现有进程并退出新进程。这会导致版本控制认为diff / merge过早完成。
将Beyond Compare配置为Windows上Git的差异和合并工具:
git config --global diff.tool bc
git config --global difftool.bc.path "c:/Program Files/Beyond Compare 4/bcomp.exe"
git config --global merge.tool bc
git config --global mergetool.bc.path "c:/Program Files/Beyond Compare 4/bcomp.exe"
使用上述命令后的.gitconfig内容:
[diff]
tool = bc
[difftool "bc"]
path = c:/Program Files/Beyond Compare 4/bcomp.exe
[merge]
tool = bc
[mergetool "bc"]
path = c:/Program Files/Beyond Compare 4/bcomp.exe