我收到以下错误:
fatal: https://github.com/username/repository-name.git/info/refs not found: did you run git update-server-info on the server?
如果我尝试推送我的存储库而不先在 github.com 上创建它。如果我首先在 github 上创建我的存储库,那么我可以毫无问题地推送分支。这个程序是常规的吗?还是我做错了什么?我认为一个存储库可以在本地创建并推送,而无需先在 github 上创建它。
最佳答案
fatal: https://github.com/username/repository-name.git/info/refs not found: did you run git update-server-info on the server?
在 GitHub 上下文中,此消息应理解为“存储库不存在”。您应该推向一个已经存在的裸存储库。裸仓库是没有工作目录的仓库,通常位于服务器端。
If I create my repository first on github, then I can push branches no problem. Is this procedure routine?
是的。您应该首先在 GitHub 上创建您的存储库。参见 help topic about this
确实,正如文档所述“要将您的项目放在 GitHub 上,您需要有一个 GitHub 存储库来 stash 它。”
关于Git fatal error : info/refs not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12406963/