Gitlab首次首次使用步驟
創建gitlab項目
在gitlab網站上創建一個項目
拉取爲本地項目
git clone https://gitlab.XXXXXX.com
創建本地分支
git branch branchName
查看分支
列出所有本地分支
$ git branch
#列出所有遠程分支
$ git branch -r
#列出所有本地分支和遠程分支
$ git branch -a
提交本地分支到遠程分支
提交本地分支到遠程分支
git push origin branchName:branchName
切換分支
git checkout branchName
提交代碼
git add .
git status
git commit -m “feat: xxx”;
git pull
git push
feat:新功能(feature)
fix:修補bug
docs:文檔(documentation)
style: 格式(不影響代碼運行的變動)
refactor:重構(即不是新增功能,也不是修改bug的代碼變動)
test:增加測試
chore:構建過程或輔助工具的變動