Generate the Commit Message
Install commitizen
1 | # install |
Validate the Commit Message
Install husky to help us use git and npm hooks
1 | yarn add husky --dev |
Install commitlint
Installation
1 | # For Windows: |
Configuration
1 | { |
Generate ChangeLog
Install conventional-changelog-cli
1 | yarn add --dev conventional-changelog-cli |
Configuration
1 | { |
Branch Management
该分支模型值得借鉴的地方包括
- 规范的分支命名
- 将分支和代码运行环境关联起来
分支和代码运行环境的关系是这样的,
- master => 生产环境
- release/,hotfix/ => 预上线环境
- feature/*,develop => 开发环境
git flow Installation
Mac
1 | brew install git-flow |
Linux
1 | curl -OL https://raw.github.com/nvie/gitflow/develop/contrib/gitflow-installer.sh |