初次将本地项目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
成功推送!
欢迎关注本人公众号一起交流学习