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上修改了自己的文件,在上传本地文件之前没有把github上的文件拉倒本地,

意思是本地和远程的文件应该合并后才能上传本地的新文件

具体方法:

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

git pull origin master

2、再上传

git push -u origin master

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM