学无先后,达者为师

网站首页 编程语言 正文

git error: failed to push some refs to

作者:cxxx17 更新时间: 2022-04-12 编程语言
git push origin master

error: src refspec master does not match any.
error: failed to push some refs to ‘https://github.com/ChenX17/bdasr.git’

Git最近把master分支改名成了main,远程没有master这个分支,可以新建一个master分支,再push到远程:

git checkout -b master
git push origin master

或者直接push到远程的main分支。

git push origin main

原文链接:https://blog.csdn.net/weixin_42262721/article/details/109691116

栏目分类
最近更新