【Git】Git处理新Repository无法push的问题
生活随笔
收集整理的這篇文章主要介紹了
【Git】Git处理新Repository无法push的问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近新建的Github項目在提交過程中報錯:
git push origin master
error: src refspec master does not match any
error: failed to push some refs to ‘https://github.com/username/repository_name’
我反復測試了多種可能的錯因,最終想到了Github為了某些目的將master改為main,而原先的master予以保留,所以提交之前的項目代碼都不會錯,這一次就會錯。
故現在的正解為:
git push origin main
總結
以上是生活随笔為你收集整理的【Git】Git处理新Repository无法push的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【数据库系统】实例和模式
- 下一篇: 【数据库系统】数据库与SQL