將本地的一個新項目上傳到GitHub上新建的倉庫中去

轉載:

如何將本地的一個新項目上傳到GitHub上新建的倉庫中去

踩過的坑:

1.在git push時報錯 error: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054php

解決方案:查了不少緣由,最後才知道是由於github在內網的狀況下網速會很慢,加了FQ軟件成功了git

2.在git commit 的時候提示 github

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

而後報錯 error: invalid key:curl

解決方案:這是一個烏龍麪 :我寫成了git config you@example.com "you@example.com" 生無可戀 ..........url

注:加上--global表示全部的項目的用戶名都是同樣的,若是隻是單個的配置去掉--global便可spa

3. git push時報錯fatal: Couldn't find remote ref master.net

解決方案:這個是由於沒有commit或者是commit沒有成功code

4. 連續兩次git remote add origin https://github.com/username/projectname.git 報錯 fatal: remote origin already exists.blog

解決方案:git remote -v 查看是否成功,若是不成功刪除掉從新來一次rem

git remote -v
git remote add origin  https://github.com/username/projectname.git
相關文章
相關標籤/搜索