如何推送本地创建的分支 [英] How to push a locally-create branch
问题描述
我使用Git GUI创建了一个新的本地分支。我承诺。我想推它,所以它的备份。
我只是做了一个 git push
认为它会知道该怎么办。认为它会推动我的分支,并在服务器上创建一个。
这个Q / A似乎应该说:
然而,我得到这个错误。
! [远程拒绝] MyBranchName - > MyBranchName(无此类参考)
错误:无法将某些参考推送到'http_link_not_allowed_by_SO'
有什么想法?
似乎远程回购得到了巩固。这是一个字。在服务器上,在refs / heads /中是一个分支的文件夹,这使得它看起来已经到达推远的地步了。
所以我重新命名了它并再次推送,这很好。
更新
该问题再次出现。这就像我只能推一次分支。
I created a new local branch using the Git GUI. I committed to it. I want to push it so its backed-up.
I just did a git push
thinking it'd know what to do. Thinking it would push my branch up and make one on the server.
This Q/A seems to say it should:
How do you create a remote Git branch?
However, I get this error.
! [remote rejected] MyBranchName -> MyBranchName (no such ref)
error: failed to push some refs to 'http_link_not_allowed_by_SO'
Any ideas?
It seems the remote repo got corruptified. That's a word. On the server, in refs/heads/ was a folder for the branch, which made it appear that it had gotten so far to pushing and died.
So I renamed it and pushed again and it was fine.
Update
It actually seems that the problem recurs again. It's like I can only push a branch once.
这篇关于如何推送本地创建的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!