error: src refspec main does not match any

This error pops up because you didn’t commit the push and you run the git push command after the git add . command. For solving this issue you need to commit first after the git add . command.

 

All you have to do is:

 

git commit -m "initial commit"

 

and then use this command.

 

git push origin main

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *