初次将本地项目push到gitee时,出现类似错误:
error: src refspec master does not match any
error: failed to push some refs to 'https://gitee.com/xxx/irojects.git'
解决方式其实就是先pull,再push:
git pull origin master
本以为这样再推送就ok啦,然而却不是:
% git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
那么还是得这样子来操作:
git push -u origin master
成功推送!
欢迎关注本人公众号一起交流学习

本文介绍了解决初次将本地项目推送到Gitee时遇到的错误:refspectmaster不匹配任何引用的问题。通过使用正确的git命令进行pull并设置远程分支为上游分支,最终成功完成推送。
16万+

被折叠的 条评论
为什么被折叠?



