Most of the times git is verbose enough when giving error messages so you can easily go through the situation. But today I faced one that it’s not that well communicated.

I was setting up a new repository on GitHub and when I executed the command git push -u origin main I got:

error: src refspec main does not match any
error: failed to push some refs to ''

It turned out that I was missing to create the very first commit so git didn’t have any commit to point and upload.