首页 > 程序人生 > 解决github报错:src refspec master does not match any Github
2014
11-11

解决github报错:src refspec master does not match any Github

When i try to push my first project, i got this message " error: src refspec master does not match any ". After browsing a litte, i found that this problem happen because i don't have initial commit yet. I just fork from empty Git Project ( brand new Git project ).

To solve this kind of problem, do this :

git init
git add README
git commit -m "Initial commit."
git remote add origin git@github.com:username/your-project.git
git push origin master

and it works for me!

编程技巧