1. 程式人生 > >github中git push origin master出錯:error: failed to push some refs to

github中git push origin master出錯:error: failed to push some refs to

由於工作忙的原因,也是自己懶的原因,本來有機會跟git更深入的接觸,確因工作原因與git失之交臂。

今天在github上建立了自己的第一個公共倉庫,然後上傳了第一專案。

github入門到上傳本地專案

在提交遠端倉庫期間遇到一個小問題:  就是本文標題錯誤,查閱資料發現,原來是在github的版本庫裡的README.md檔案沒有Pull到本地庫

先執行:git pull --rebase origin master

try git pull rebase origin master

?

可以看到,此時已經把github上最新的檔案下載下來了:

now have downloded readme.md file from github repo

即,那個README.md檔案。

4.接著再去:

git push origin master

now do git push origin master ok

?
1 2 3 4 5 6 7 8 9 10 11 [email protected]  /cygdrive/e/dev_root/git/crifanLib $ git push origin master Username  for 'https://github.com' : Password 
for 'https://[email protected]' : Counting objects: 19,  done . Delta compression using up to 4 threads. Compressing objects: 100% (14 /14 ),  done . Writing objects: 100% (18 /18 ), 112.33 KiB,  done . Total 18 (delta 0), reused 0 (delta 0) To https: //github .com /crifan/crifanLib .git     6bae951..32d67c7  master -> master

 

即可成功把本地的檔案都上傳到github上面去了。

5.此時再去github網站上也就可以看到對應檔案了:

github project can see files