我刚开始使用git和github.我按照他们的指示在最后一步遇到了错误.我正在检查当前不受源控制的现有目录(项目大约一周).除此之外,我的用例应该是磨机的运行.
这是发生了什么:
$ 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 'git@github.com:{username}/{projectname}.git'
Run Code Online (Sandbox Code Playgroud)
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 git@github.com:{username}/{projectname}.git
git push origin master
Run Code Online (Sandbox Code Playgroud)