未能推一些参考“https://github.com/myname/myrepo” [英] failed to push some refs to 'https://github.com/myname/myrepo'

查看:245
本文介绍了未能推一些参考“https://github.com/myname/myrepo”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于magit / push的问题

question on magit / push

我开始使用magit,在git中的经验很少。

I'm starting using magit, with very little experience in git.

我已经成功地通过了magit手册:

I've gone trough the magit manual with success for :

adding
ignoring
staging
commiting locally

然后,我尝试推送github.com/myname。为此,我使用'P P',然后输入用户名和密码。

Then, I try to push on github.com/myname. For that, I use 'P P', entering then my username and password.

如果失败,


https://github.com/myname/myrepo ! [拒绝]主 - >主(非快进)错误:无法推一些参考'https://github.com/myname/myrepo'

提示:更新被拒绝,因为您当前分支的提示落后于

hint:其远程对应。合并远程更改(例如git pull)

hint:再次推送。

hint:请参阅git push -help中的关于快进的注意事项细节。


git异常退出代码1。

To https://github.com/myname/myrepo ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/myname/myrepo'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push –help' for details.

git exited abnormally with code 1.

我以为我会解决它在这里提到
git config --global push.default current
但它没有帮助。

I thought I would solve it as mentionned here with git config --global push.default current But it doesn't help.

我已经有一个lok在< a href =https://stackoverflow.com/questions/14609263/geting-an-error-pushing-to-github-updates-were-rejected-because-a-pushed-branc>将错误推送到github - 更新被拒绝,因为推送的分支提示位于其远程之后,但没有工作。

I've had a lok at Geting an error pushing to github - Updates were rejected because a pushed branch tip is behind its remote but did'nt got it to work

任何想法?

推荐答案

您必须先更改或 push -f 更改。

这篇关于未能推一些参考“https://github.com/myname/myrepo”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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