海mia婊婊想上岸

导航

error: src refspec main does not match any

尝试把远程仓库与本地仓库建立联系时遇到的问题:
我复制github的推荐的指令,尝试推送文件到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 on 2024-12-01 13:34  海mia婊婊想上岸  阅读(186)  评论(0)    收藏  举报