我正在尝试将BeyondCompare4配置为我在git中的扩散工具和合并工具。我使用的是git版本2.5.0窗口1。到目前为止,BeyondCompare4是一个很好的工具,但不是一个合并工具。
在我的主分支中,我运行git mergetool branch3,它使用No files need merging进行响应
但是当我运行git diff branch3时,我可以在一个文件中看到几种类型的差异(通常在同一行中)。如果我只运行git merge branch3,它就会启动合并过程并停止冲突。那么,为什么git mergetool不以同样的方式为我工作呢?
这个链接暗示了git config --global core.trustctime false,我尝试了它,但没有结果:git mergetool reports "No files need merging"
这个链接提示重新播放可能是一个问题,所以我也尝试了git config --global rerere.enabled false,但没有运气:git tells me that I Merge conflict, but also tells me that no files need merging
这就是我的.gitconfig的样子:
[diff]
tool = bc
[difftool]
prompt = false
[difftool "bc"]
trustExitCode = true
cmd = 'c:/program files (x86)/beyond compare 4/bcomp.exe' $LOCAL $REMOTE
[merge]
tool = bc
[mergetool]
prompt = false
[mergetool "bc"]
trustExitCode = true
cmd = 'c:/program files (x86)/beyond compare 4/bcomp.exe' $LOCAL $REMOTE $BASE $MERGED我甚至尝试修改.gitconfig,将bcomp4.exe路径更改为虚假的东西,以查看是否可以得到错误。如果我改变了扩散工具,我就会发现系统错误,找不到路径。但是如果我在mergetool上更改它,它就会不停地说“没有文件需要合并”,这让我相信BeyondCompare4甚至没有运行。
谢谢您的任何想法,为什么git mergetool会提前停止发送这条消息。
发布于 2015-08-29 21:15:07
当您处于需要解决冲突的状态时,即在合并导致冲突之后,您应该使用git mergetool。
git checkout master
git merge branch3
# the merge reports conflicts which we need to resolve
git mergetool
git add -u
git commit -m "a merge commit message"有关使用meregetool解决冲突的更多信息,请参见https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging#Basic-Merge-Conflicts。
有关选项,请咨询git help mergetool。
https://stackoverflow.com/questions/32290405
复制相似问题