安装

    1. npm install commitizen --save-dev
    2. npm install cz-conventional-changelog --save-dev

    使用

    1. git cz
    2. cz-cli@4.1.2, cz-conventional-changelog@3.2.0
    3. #指定commit的类型,约定了feat、fix两个主要type,以及docs、style、build、refactor、revert五个特殊type
    4. ? **Select the type of change that you're committing:** fix: A bug fix
    5. #用于描述改动的范围,格式为项目名/模块名
    6. ? **What is the scope of this change (e.g. component or file name): (press enter t**
    7. **o skip)** index.html
    8. #对改动进行简短的描述
    9. ? **Write a short, imperative tense description of the change (max 83 chars):**
    10. (11) add a blank
    11. #对改动进行长的描述
    12. ? **Provide a longer description of the change: (press enter to skip)**
    13. #是破坏性的改动吗
    14. ? **Are there any breaking changes?** No
    15. #影响了哪个issue吗,如果选是,接下来要输入issue号
    16. ? **Does this change affect any open issues?** No