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