github新建代码仓库第一次上传报错

git init
git remote add origin git@github.com:wanqing99/wanqing99.github.io.git
git branch -M main
git push -u origin main

有报错error: src refspec main does not match any
应该是我新建的github仓库一个文件都没有导致的,所以先commit一下再push。

git add .
git commit -m 'chore: git init + hexo init'
git push -u origin main
posted @ 2025-02-13 09:35  究极不吃香菜  阅读(11)  评论(0)    收藏  举报