Friday, October 3, 2014

Git error: src refspec master does not match any

I encounter an error when I push my code into my github, and here is the reason why this happen: I've created a new repository and added some files to the index, but I haven't created my first commit yet. So I did this: Add files:
$ git add index.php 
Add comments:
$ git commit -m "Initial commit" 
And finally, I can do the remote push:
$ git remote add origin git@github.com:QuanCat/instant_search.git
$ git push -u origin master

No comments:

Post a Comment