git push origin master 时出现报错 error: src refspec master does not match any error: failed to push some

git push origin master 时出现报错

因为当前分支并不是master,而是main,所以导致失败

解决方案:

git switch -c master

转到master分支,再push即可

你可能感兴趣的:(git push origin master 时出现报错 error: src refspec master does not match any error: failed to push some)