解决error: src refspec main does not match any


出错的git命令:

git push -u origin main

解决方法:
git show-ref
8c4c7afc8d831dcba4f8989e39eb8286c1657439 refs/heads/master

新命令:

git push -u origin master

成功解决


参考:
https://stackoverflow.com/questions/4181861/message-src-refspec-master-does-not-match-any-when-pushing-commits-in-git


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM