一、GIT安裝
- windows安裝鏈接:https://git-scm.com/download/win【網速慢可移至網盤下載:https://pan.baidu.com/s/1kU5OCOB#list/path=%2Fpub%2Fgit】
- 默認點擊下一步,安裝完成后,打開Git->Gitbash,彈出窗口,則說明安裝成功
二、在本地設置用戶名及郵箱
- 打開GitBash,輸入:
- git config --global user.name[yourname]
- git config --global user.email[your email address]
三、打開pycharm進行設置
- 打開File->Settings
- 在搜索框輸入git,找到GitHub,輸入用戶名&密碼登錄【賬號可在GitHub官網上注冊】,輸入完成后可點擊test進行連接測試
- 如下圖,選擇VCS->Import into Version Control->Share Project on GitHub
- 設置完成后,如下圖,點擊VCS->Git->Commit File...,上傳代碼