Home > Software design >  Git: error: src refspec master does not match any even after running git commit -m
Git: error: src refspec master does not match any even after running git commit -m

Time:10-17

After running git init, git add ., git commit -m "Test", and finally git push origin master --force, I still get the following error:

error: src refspec master does not match any

CodePudding user response:

Before doing git push -u origin master do:
git remote add origin <repo_git>
If using github, repo git will be:
https://github.com/username/reponame.git
Or just click on the code button on your github repo and copy the link.

  •  Tags:  
  • git
  • Related