日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

git push origin master报错

發(fā)布時(shí)間:2025/3/15 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 git push origin master报错 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

git push origin master報(bào)錯(cuò)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)端的時(shí)候出現(xiàn)問題,報(bào)錯(cuò)信息如下所示

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的時(shí)候,默認(rèn)的branch名稱改成了main,而不是原來的master,因此在提交修改到remote的時(shí)候要將倉庫的名稱修改成main。

git push origin main

現(xiàn)在就可以愉快地提交修改到github遠(yuǎn)端了~

總結(jié)

以上是生活随笔為你收集整理的git push origin master报错的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。