git push origin master
遇到报错:
error: src refspec master does not match any.
error: failed to push some refs to 'ssh://xxxxx.com/project.git'
解决方案:
- Try
git show-ref
to see what refs you have. Is there arefs/heads/master
?
git show-ref
2. You can try git push origin HEAD:master
as a more local-reference-independent solution. This explicitly states that you want to push the local ref HEAD
to the remote ref master.
git push origin HEAD:master