利用Git命令上傳本地項目到github

第一步:註冊github賬戶(略).

第二步:安裝Git

第三步:在github上新建與本地項目名一樣的Repository.如下圖:

第四步:鼠標右鍵點擊本地項目,選 Git Bash Here

第五步:依次輸入以下命令:

git init                                                      敲完回車

git add .                                                  敲完回車(注意 後面有一點,別丟了)

git commit -m "first commit"                   敲完回車

git remote add origin https://github.com/{你的github賬戶名}/{你的項目名}.git               敲完回車

git push -u origin master                        敲完回車

本地項目已上傳到github,結束。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章