原文:由於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