如果你对该文章中的内容有疑问/不解,可以点击此处链接提问
要注明问题和此文章链接地址 点击此处跳转
使用git push提交代码时提示如下错误:
error: failed to push some refs to 'git@github.com:....." Updates were rejected because the remote contains work that you do not have locally.
This is usually caused by another repository pushing to
大概原因就是 意思是本地和远程的文件应该合并后才能上传本地的新文件
解决方案
1、先从远程拉下来(pull),会自动合并的
git pull origin master
2、再上传
git push -u origin master
成功解决问题