在vscode上提交代码到GitHub上时,最后一步报错

来源:2-4 上传代码至github

weixin_慕慕5233989

2021-05-05 19:07

% git push -u origin main                                          

error: src refspec main does not match any

error: failed to push some refs to 'https://github.com......


试了生成个.ssh文件夹的什么文件,把文件内容添加到了GitHub后台ssh,但是依然还是这个问题

不知道是哪里出的问题

写回答 关注

1回答

  • weixin_慕慕5233989
    2021-05-05 22:28:43

    搞定了 最后一行使用的是 git push -f origin master 成功的

    weixin...

    不知道为啥 我的git仓库后面是 git push -u origin main 这个命令

    2021-05-05 23:23:10

    共 1 条回复 >

全方位入门git

通过git基本命令以及git与github的拓展来全方位入门git。

24163 学习 · 84 问题

查看课程

相似问题