- 首先下載git for windows,直接安裝。
- 添加SSH KEY,在github上“setting”里面按照步驟進行。
3.在github上創(chuàng)建一個倉庫,例如test。 - 在本地的項目(test項目)文件夾下右鍵Git bash here。
- 輸入 git init,這個命令會在項目目錄下生成一個.git的目錄,這里面存放的就是項目的版本庫和git配置文件。
- 為了利用github給你智能生成的.gitignore和readme.md文件,先將github上的倉庫pull一下,在git bash終端輸入git pull https://github.com/~~~/test.git,倉庫地址通過下圖地方復制

Paste_Image.png
6.添加項目更新,git add .
7.提交項目更新,git commit -m "first time commit"
8.建立遠程倉庫,git remote add origin https://github.com/~~~/test.git
9.push更新,git push -u origin master
這樣本地倉庫就與github上面?zhèn)}庫建立聯系啦,以后再有更新項目就只需要6、7、9步驟就行啦。