由于某些原因,最近每次拉动并发生合并冲突时,运行git mergetool报告"没有文件需要合并":
$ git pull
First, rewinding head to replay your work on top of it...
Applying: replaced home button with Cancel
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
Classes/Controllers/HomeController.m
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0002 moved rollback into cancel …Run Code Online (Sandbox Code Playgroud) 我正在尝试将 BeyondCompare4 配置为 git 中的 difftool 和 mergetool。我正在使用 git 版本 2.5.0.windows.1。到目前为止,BeyondCompare4 作为 difftool 工作得很好,但不能作为合并工具。
从我的主分支运行git mergetool branch3,它响应No files need merging
但是当我运行时,git diff branch3我可以在一个文件中看到几种类型的差异(通常在同一行)。如果我只是运行git merge branch3它,它确实会启动合并过程并以 CONFLICT 停止。那么为什么不git mergetool以同样的方式为我工作呢?
此链接建议git config --global core.trustctime false我尝试失败:
git mergetool 报告“没有文件需要合并”
此链接表明 rerere 可能有问题,所以我git config --global rerere.enabled false也尝试过,但没有运气:
git 告诉我我合并冲突,但也告诉我没有文件需要合并
这是我的 .gitconfig 的样子:
[diff]
tool = bc
[difftool]
prompt = false
[difftool "bc"]
trustExitCode = true
cmd = 'c:/program files (x86)/beyond compare …Run Code Online (Sandbox Code Playgroud)