git cz
: git commit 规范化提交参考:
此种方式特别适用于 非 Node.js 项目 (无
package.json
)
npm install -g commitizen
注意: 安装完这个, 都还不行, 此时虽然
git cz
可用,但不是 交互式提示
npm install -g cz-conventional-changelog
全局模式下, 需要
~/.czrc
配置文件, 为 commitizen 指定 Adapter.
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
Simply use
git cz
or justcz
instead ofgit commit
when committing. You can also usegit-cz
, which is an alias forcz
.
适用于
Node.js
项目 (有package.json
)
感谢帮助!