Missing or skipping git add . or git commit may cause this error:
git push -u origin master Username for 'https://github.com': yourusername Password for 'https://[email protected]': error: src refspec master does not match any. error: failed to push some refs to 'https://github.com/yourusername/foobar.git' To fix it, reinitialize and follow the proper sequence:
git init git add . git commit -m 'message' git *create remote git push -u origin master git init git add . git commit -m 'message' git *create remote git push -u origin master