GitHub提交代碼最簡教程
阿新 • • 發佈:2017-10-15
keygen http data 獲取 成功 db2 地址 .cn 學會 很久以前就註冊了GitHub,但一直沒有使用過。一來是沒什麽項目好寫的,二來在window和服務器上操作不順利。
斷斷續續接觸了更多的GitHub信息,恰巧最近在學python,就將學習過程上傳到GitHub吧,順便也學會了git。
1、GitHub 上添加SSH key
mac終端 執行 ssh-keygen -t rsa,連按三次回車。
cat ~/.ssh/id_rsa.pub 查看公鑰。
登錄自己的GitHub,點擊右上角頭像--》Settings
左側點擊“SSH and GPG keys”, 點擊右上角“New SSH key”,將公鑰復制到key,點擊“Add SSH key”,添加SSH key成功!
驗證ssh key, $ ssh -T [email protected]
2、GitHub創建project,本地提交代碼
GitHub上創建project,獲取git地址
將項目clone到本地
$ git clone [email protected]:chcjp/python_test.git
$ git add read_sat.py
$ git commit -m ‘read xls to txt test‘
$ git pull origin master //向GitHub提交代碼
如有問題歡迎評論討論。
完了!
GitHub提交代碼最簡教程