解決:git push error: failed to push some refs to


出現錯誤的原因是github中的README.md文件不在本地代碼目錄中。

也就是說我們需要先將遠程代碼庫中的任何文件先pull到本地代碼庫中,才能push新的代碼到github代碼庫中。

使用如下命令:git pull --rebase origin master

然后再進行上傳: git push -u origin master

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM