1.git 登錄
通過gitbash 直接進入git 命令模式
git的賬號密碼登錄
git config --global user.email "847987366@qq.com"
git config --global user.name "Johnyewen123"
2.生成公共秘鑰以及私有秘鑰
ssh-keygen -t rsa -C "847987366@qq.com"
3.進入.ssh文件夾,將id_rsa.pub打開並將其拷貝
4.登錄github ->進入設置->SHS and GPG key ->新建對應的秘鑰
5.在本地新建文件,進行提交測試
5.1 進入文件夾,進行git init
git init
5.2 在github 上新建對應的repository
5.3 復制對應的git 項目遠程地址
git@github.com:Johnyewen123/testgit20200212a.git
5.4 git add
$ git add test.txt
5.5 增加提交信息
$ git commit -m "123
5.6 將本地的文件push到遠端
git push git@github.com:Johnyewen123/testgit20200212a.git
git報錯:'fatal:remote origin already exists'怎么處理?附上git常用操作以及說明。
git remote rm origin
然后重新 安裝上述過程 add->commit->push