error: src refspec head does not match any.
error: failed to push some refs to 'https://github.com/xxx.git
First my project is not a new and empty project.
only just one line of code solved it:
git push origin HEAD:master
because somehow your git is using wrong ref for head.
git push origin master
don't use git push origin head