发表文章

[最新] Updates were rejected because the remote contains work that you do

qq40468795 28天前 0

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
错误原因:在github上修改了文件,没有更新到本地就上传
解决方法:本地和远程的文件应该合并后才能上传本地的新文件
具体方法:

1、先拉下来,会自动合并的(不用操心)

git pull origin master

2、再上传

git push -u origin master
也可以通过ide拉取、提交

相关推荐
最新评论 (0)
返回
发表文章
qq40468795
文章数
14
评论数
0
注册排名
788777