git cz 使用方法

git cz 使用方法

一,配置git cz

  1. 首先需要安装nodejs,因为要使用npm

  2. 控制台输入

    npm install -g commitizen
    #若速度较慢就用cnpm
    cnpm install -g commitizen
    
  3. 进入你想要使用git cz命令的git项目

    npm init --yes
    #第二条命令可能需要加入    --force
    commitizen init cz-conventional-changelog --save --save-exact
    
  4. 现在就可以使用git cz代替git commit来生成专业的commit了

二,使用git cz

git cz

cz-cli@4.1.2, cz-conventional-changelog@3.2.0

#指定commit的类型,约定了feat、fix两个主要type,以及docs、style、build、refactor、revert五个特殊type
? **Select the type of change that you're committing:** fix:   A bug fix

#用于描述改动的范围,格式为项目名/模块名
? **What is the scope of this change (e.g. component or file name): (press enter t**
**o skip)** index.html

#对改动进行简短的描述
? **Write a short, imperative tense description of the change (max 83 chars):**
 (11) add a blank

#对改动进行长的描述
? **Provide a longer description of the change: (press enter to skip)**

#是破坏性的改动吗
? **Are there any breaking changes?** No

#影响了哪个issue吗,如果选是,接下来要输入issue号
? **Does this change affect any open issues?** No
  • 2
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值