解決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