git push origin master报错
生活随笔
收集整理的這篇文章主要介紹了
git push origin master报错
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
git push origin master報錯error: src refspec xxx does not match any / error: failed to push some refs to
在git add xxx.py和git commit -m 'description’之后,最后一步將本地修改之后的文件提交到github遠(yuǎn)端的時候出現(xiàn)問題,報錯信息如下所示
error: src refspec xxx does not match any / error: failed to push some refs to在網(wǎng)上查過很多資料之后,發(fā)現(xiàn)都沒辦法解決。后來無意間發(fā)現(xiàn),現(xiàn)在github新建repository的時候,默認(rèn)的branch名稱改成了main,而不是原來的master,因此在提交修改到remote的時候要將倉庫的名稱修改成main。
git push origin main現(xiàn)在就可以愉快地提交修改到github遠(yuǎn)端了~
總結(jié)
以上是生活随笔為你收集整理的git push origin master报错的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 生信分析和统计作图资源推荐
- 下一篇: github本地文件和远端文件的协同