git “无法拉入状态为 merging_resolved 的存储库”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16271906/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"cannot pull into a repository with state: merging_resolved"
提问by Erel Segal-Halevi
After some pulling, merging and conflict resolving, my GIT is stuck. This is what I tried to do (with EGit) on the main project:
经过一些拉动、合并和冲突解决,我的 GIT 卡住了。这就是我在主项目上尝试做的(使用 EGit):
- "Pull" returns "cannot pull into a repository with state: merging_resolved"
- "Fetch from upstream" returns "No ref to fetch from GeniusWebSocket - origin - everything up to date."
- "Merge" is greyed in the menu.
- "Commit" returns "Commit/amend not possible...".
- "Push to upstream" returns "rejected - non-fast-forward".
- "Add to index" does nothing.
- “拉”返回“无法拉入状态为 merging_resolved 的存储库”
- “从上游获取”返回“没有从 GeniusWebSocket 获取的引用 - 来源 - 一切都是最新的。”
- 菜单中的“合并”是灰色的。
- “提交”返回“提交/修改不可能......”。
- “推到上游”返回“拒绝 - 非快进”。
- “添加到索引”什么都不做。
Near the project title, I see [Merged master up-arrow 1 down-arrow 1].
在项目标题附近,我看到 [Merged master up-arrow 1 down-arrow 1]。
$ git status
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 1 different commit each, respectively.
#
nothing to commit (working directory clean)
How can I proceed?
我该如何继续?
回答by VonC
Since you have finished your merge, and if you don't have any pending changes, you can try a git reset --hard
, and see if the issue persists.
(See EGit reset your current HEAD)
由于您已完成合并,并且如果您没有任何待处理的更改,您可以尝试 a git reset --hard
,看看问题是否仍然存在。(请参阅EGit 重置您当前的 HEAD)
Ankit Marothisuggests in the comments:
I resolved it by resetting it from egit, using
Team->Reset
and usingmixed reset
as the option.
我通过从 egit 重置它,使用
Team->Reset
和使用mixed reset
作为选项来解决它。
回答by Priya Tuli
I was facing the same problem . I did a project import in between of resolving conflicts that appeared after doing a pull.
我面临着同样的问题。我在解决拉动后出现的冲突之间做了一个项目导入。
I solved it by following steps: 1. Right click on repository and click on Reset 2. I selected a branch under Remote Tracking on which there was most recent changes 3. did a MIXED Reset Type
我通过以下步骤解决了它: 1. 右键单击存储库并单击重置 2. 我在远程跟踪下选择了一个分支,该分支上有最近的更改 3. 做了一个混合重置类型
Finally, I got all the latest version with my changes in unstaged version.
最后,我获得了所有最新版本,并在非暂存版本中进行了更改。
回答by Ram
If working in eclipse IDE. goto -> Git Staging
view -> commit & push, if you see there is a commit message already.
如果在 Eclipse IDE 中工作。goto -> Git Staging
view -> commit & push,如果你看到已经有提交信息了。
If you don't see any commit message there, synchronize your repository and go back to check it again.
如果您在那里没有看到任何提交消息,请同步您的存储库并返回再次检查。