git 配置上傳到gitlab(Windows7)

1. 安裝git

2. 註冊gitlab

3. 在桌面右鍵點擊git bash here

4.ssh-keygen -t rsa -C "郵箱"      

   然後一路回車

5.複製id_rsa_pub文件裏面的所有內容加到gitlab中

6.首次上傳

(1)在git bash命令行裏進入項目目錄

(2)git init

(3)git add .  ("."代表加入目錄所有文件)

(4)git commit -m "first“

(5)git remote add origin +  git項目地址

(6)git push -u origin master (origin 和上面一樣就行,不必非要origin)

7. 以後更新提交

(1 )git branch       (查看當前分支)

(2)git pull  (更新代碼到本地  )

(3)git add **/**/文件名 (感覺直接 add . 也行)

(4)git status (看一下 更新狀態 防止衝突)

(5) git commit -m "更改信息“

(6)git push

 

哪有不對,批評指正

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章