I clone my repository with:
git clone ssh://xxxxx/xx.git
But after I change some files and add and commit them, I want to push them to the server:
git add xxx.php
git commit -m "TEST"
git push origin master
But the error I get back is:
error: src refspec master does not match any.
error: failed to push some refs to 'ssh://xxxxx.com/project.git'
git show-refto see what refs you have. Is there arefs/heads/master?git push origin HEAD:masteras a more local-reference-independent solution. This explicitly states that you want to push the local refHEADto the remote refmaster(see the git-push refspec documentation).