OuZeBo原創作品。轉載請注明出處 http://www.cnblogs.com/OuZeBo/p/7477465.html
1、下載git:https://git-scm.com/
2、安裝(本人選擇默認路徑,下一步-->end)
3、注冊github賬號
4、git的簡單配置
$ git config --global user.name yourName
$ git config --global user.email yourEmail@xxx.com
5、github配置添加SSH
$ ssh-keygen -t rsa -C "yourEmail@xxx.com"
ssh-key的生成路徑(默認路徑):C:/user/administrator/.ssh下的id_rsa.pub文件下
6、將ssh配置到GitHub中
將id_rsa.pub用記事本打開,將里面內容復制到github ssh配置中的key
7、創建本地倉庫
可參考:http://www.runoob.com/git/git-create-repository.html
$ git clone <github項目倉庫路徑> <本地項目路徑>
8、上傳文件到github倉庫
手動創建d.txt
$ git add d.txt
$ git commit //將文件上傳到本地倉庫
$ git push //將文件上傳到guihub項目倉庫
注:在$ git commit過程中,可能出現這個錯誤(E325:注意Aborting commit due to empty commit message.):
這個錯誤是在git 提交時沒有寫注示文字
操作:新建一個命令窗口,輸入: $ git commit -m "注釋文字"
9、下載github項目倉庫文件
$ git pull