Boutros Douaihy Boutros Douaihy - 4 months ago 49
Git Question

error when pushing to git-lab when doind git push origin master: src refspec master does not match any

I created a project on git lab and I just did the git remote add origin and it succeeded but the git push origin master is displaying:


error : source ref spec master does not match any, error: failed to push some refs to 'my git project path'.

Answer Source

Maybe you forgot to commit. Try

git init
git commit -m "Your commit message here..."
git push -u origin master
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download