在自我中被拒绝的非快进问题 [英] getting rejected non fast forward issue in egit

查看:65
本文介绍了在自我中被拒绝的非快进问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从2.0版结帐了。

I have done checkout from branch 2.0 .

现在我对文件之一进行了更改。

我想将其提交到分支,即2.0分支,

所以我右键单击文件,选择team-> commit选项
我要我选择branch。

Now I made changes to one of the file.
I want to commit it to branch i.e 2.0 branch,
So I right click on file , select team->commit option I ask me to select branch .

所以我选择了2.0和存储库URL。
当我单击时,提交并删除。 push ,在下一个框上,它给了我确认框,其预期的推送结果为2.0 [rejected-non-fast-forward]。

So I selected 2.0 and repository url. When I click , commit & push , on next box ,it is giving me confirmation box with expected push result as 2.0 [rejected-non-fast-forward].

是因为我不在开发组中,也不在主数据库中吗?

我也可以在本地提交上进行更改,但是它没有反映在主副本中,因此他们将其提交到主副本的任何方式都是如此。

Is it because of I am in develop group not in master ?
Also I able to changes on my local commit, but it is not reflected in master copy so is their any way to commit it to master copy.

确认框的截图。

推荐答案

是的。

您尝试将代码从不同于master的分支中推送出去,并且无法进行。

You try to push code from branch different to master and you cant.

# commit all your changes to the desired branch (develop is i understand you correctly)

# checkout the master branch
git checkout master

# merge the changes from develop into master
git merge develop

# now push the changes
git push origin master.

git合并创建了一个新的合并提交,现在您可以将其推回master。

The git merge created a new merge commit and now you can push it back to master.

这篇关于在自我中被拒绝的非快进问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆