首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >使用 Commitizen 撰写 Angular 规范的 Commit Message

使用 Commitizen 撰写 Angular 规范的 Commit Message

作者头像
Theo Tsao
发布2018-09-07 16:18:03
6990
发布2018-09-07 16:18:03
举报
文章被收录于专栏:Theo TsaoTheo Tsao

1. 安装及配置

npm install -g commitizen
npm install -g cz-conventional-changelog
commitizen init cz-conventional-changelog --save-dev --save-exact --force

2. 使用

git cz -m 代替 git commit -m 就可以轻松的写出 Angular 规范的 commit message 了。

commit message header 格式如下:

type(scope): subject

type:commit 的类型,有如下7种:

feat:     A new feature
fix:      A bug fix
docs:     Documentation only changes
style:    Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
refactor: A code change that neither fixes a bug nor adds a feature
perf:     A code change that improves performance
test:     Adding missing tests or correcting existing tests

scope:commit 影响的范围

subject:commit 目的的简明描述

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-01-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1. 安装及配置
  • 2. 使用
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档