git Eclipse EGIT - 所有提交,拉取,合并,标记为合并,仍在推送我被“拒绝 - 非快进”,我错过了什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10525859/
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
Eclipse EGIT - all committed, pulled, merged, marked as merged, still on push I get "rejected - non-fast forward", what am I missing?
提问by Eran Medan
I'm starting to experiment with Git, and I'm sure I'm missing something, as I can't do a simple merge and push
我开始尝试使用 Git,但我确定我遗漏了一些东西,因为我无法进行简单的合并和推送
Here is what I do (I probably got it in the wrong order, or wrong in any order, please correct if it is)
这是我所做的(我可能以错误的顺序得到它,或者以任何顺序错误,如果是,请更正)
- pull
- Syncronize Workspace
- on conflicts - did a manual merge,
- then "Mark as Merged" (is it necessary?)
- on the rest - allowed the automatic merge
- commit my changes
- pressed push (origin-master)
- I get the famous "rejected - non-fast forward"
- did a "fetch" to check - nothing to update
- did another commit - nothing to commit
- 拉
- 同步工作区
- 关于冲突 - 进行了手动合并,
- 然后“标记为合并”(有必要吗?)
- 其余的 - 允许自动合并
- 提交我的更改
- 按下推(原点主)
- 我得到了著名的“拒绝 - 非快进”
- 做了一个“获取”来检查 - 没有什么可更新的
- 做了另一个提交 - 没有什么可提交的
What am I missing?
我错过了什么?
Not sure if it's relevant but I'm using Windows 7, EGit (1.3.0.201202151440-1) in Eclipse Indigo (SR2, build 20120216-1857) and pushing to GitHub
不确定它是否相关,但我在 Eclipse Indigo(SR2,构建 20120216-1857)中使用 Windows 7,EGit(1.3.0.201202151440-1)并推送到 GitHub
回答by Eran Medan
I think I found it, instead of "Mark as Merged", I need to do "Add"
我想我找到了,而不是“标记为合并”,我需要做“添加”
Manual conflict resolution
To resolve a conflict you have to do the following steps:
Navigate to the conflicting resource Edit the content of the conflicting resource Tell EGit that the conflict is resolved with Team -> Add
Commit the conflict resolution with Team > Commit
手动解决冲突
要解决冲突,您必须执行以下步骤:
导航到冲突资源 编辑冲突资源的内容 通过Team -> Add告诉 EGit 冲突已解决
使用Team > Commit 提交冲突解决方案
from http://wiki.eclipse.org/EGit/User_Guide#Manual_conflict_resolution
来自http://wiki.eclipse.org/EGit/User_Guide#Manual_conflict_resolution
Edit:apparently, I should have learned git command line before playing with EGit, same concept there
编辑:显然,我应该在玩 EGit 之前学习 git 命令行,那里有相同的概念