推一个大的github回购失败,因为“无法推到不合格的目的地:主” [英] Pushing a large github repo fails with "unable to push to unqualified destination: master"
问题描述
我有一个很大的git仓库(从SVN仓库创建),我想把它推到github上。鉴于它很大,我不能直接尝试推送它,因为它会出现包装太大的错误。
目前为止,我可以推回购一次提交。但是当我尝试这样做的时候会发生什么:
git push origin 86c310d8a680d6d0e052fa7db89adb25348f3e54:master
error:unable to push到非限定目的地:master
目的地refspec既不匹配远程的现有ref,
也以refs /开头,并且我们无法根据源参考猜测前缀。
所以,在远程仓库还没有master分支,但我试图推动它和它失败。
我该如何解决这个问题?或者如何在远程创建一个空的主分支,以便我可以推送它?
推送到 refs / heads / master
,只是这一次。这将明确地将其创建为分支,并且您将能够在将来正常推送它。
I have a large git repo (created from an SVN repo) and I want to push it to github. Given it's large, I can't just try and push it directly, as it fails with a "pack too large" error.
All good so far, I can push the repo one commit at a time. But when I try to do this what happens is:
git push origin 86c310d8a680d6d0e052fa7db89adb25348f3e54:master
error: unable to push to unqualified destination: master
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
So, there is no master branch at the remote repo yet, but I'm trying to push to it and it fails.
How do I fix this? Or how do I create an empty master branch at the remote so I can push to it?
Push to refs/heads/master
, just this one time. That will create it unambiguously as a branch, and you'll be able to push to it normally in the future.
这篇关于推一个大的github回购失败,因为“无法推到不合格的目的地:主”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!