【发布时间】:2020-04-15 18:28:46
【问题描述】:
我在自己的分支上,在提交 5 或 6 次之前我遇到了这个问题
First, rewinding head to replay your work on top of it...
Applying: commit x
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: The following untracked working tree files would be overwritten by merge:
.idea/.gitignore
.idea/credit-policy-runs.iml
.idea/dataSources.xml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
Please move or remove them before you merge.
Aborting
error: Failed to merge in the changes.
Patch failed at 0001 commit x
hint: Use 'git am --show-current-patch' to see the failed patch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
当我无法执行 git rm 和 git rebase --continue 时,我不久前遇到了类似的问题,但我认为我已经解决了,显然我只是推迟了它。
更新:当我删除 vim .idea/.gitignore 时,有一个文件,但是当我运行 git rm .idea/.gitignore 时,我遇到了致命错误:pathspec '.idea/.gitignore' 与文件不匹配
更新:当我尝试使用 -Xtheirs 运行变基时,出现这些错误
CONFLICT (modify/delete): Runs.avpr deleted in origin/develop and modified in HEAD~63. Version HEAD~63 of Runs.avpr left in tree.
CONFLICT (modify/delete): .idea/misc.xml deleted in origin/develop and modified in HEAD~63. Version HEAD~63 of .idea/misc.xml left in tree at .idea/misc.xml~HEAD~63.
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
【问题讨论】:
-
这并不能解决问题
-
我认为确实如此。声称文件不存在似乎是错误的。
-
你的提交是变基的吗?
-
阅读时是否运行 IDE?