原文:由于github仓库中提前建立readme文件,导致git push报错error: failed to push some refs to 'git@github.com:

原因: GitHub远程仓库中的README.md文件不在本地仓库中。 解决方案: ...

2017-02-16 20:19 0 2210 推荐指数:

查看详情

Git push 报错error: failed to push some refs to 'git@github.com'

出错原因 当我们在github版本库中发现一个问题后,你在github上对它进行了在线的修改;或者你直接在github上的某个库中添加readme文件或者其他什么文件,但是没有对本地库进行同步。这个时候当你再次有commit想要从本地库提交到远程的github库中时就会出现push失败的问题 ...

Mon Jul 23 15:26:00 CST 2018 0 1774
error: failed to push some refs to 'git@github.com:....." Updates were rejected because the remote contains work that you do not have locally.

造成这个错误是因为我在github上修改了自己的文件,在上传本地文件之前没有把github上的文件拉倒本地, 意思是本地和远程的文件应该合并后才能上传本地的新文件 具体方法: 1、先拉下来,会自动合并的(不用操心) git pull origin master 2、再上传 git ...

Tue Nov 01 23:46:00 CST 2016 0 11160
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM