在新存储库上推送原始主错误 - Push origin master error on new repository

问题:

I just started using git with github.我刚开始在 github 上使用 git。 I followed their instructions and ran into errors on the last step.我按照他们的指示,在最后一步遇到了错误。 I'm checking in an existing directory that isn't currently source-controlled (project about a week old).我正在检查当前不受源代码控制的现有目录(大约一周前的项目)。 Other than that, my use case should be pretty run of the mill.除此之外,我的用例应该是完全正常的。

Here's what's happening:这是发生了什么:

$ git push origin master
error: src refspec master does not match any.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to '[email protected]:{username}/{projectname}.git'

Github's instructions: Github 的说明:

Global setup:

  Download and install Git
  git config --global user.name "Your Name"
  git config --global user.email {username}@gmail.com

Next steps:

  mkdir projectname
  cd projectname
  git init
  touch README
  git add README
  git commit -m 'first commit'
  git remote add origin [email protected]:{username}/{projectname}.git
  git push origin master

解决方案:

参考一: https://en.stackoom.com/question/3TEN
参考二: https://stackoom.com/question/3TEN
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章