1.commitizen介绍
Commitizen是一款用于实现Git提交信息规范化的命令行工具,通过交互式引导帮助开发者生成符合约定格式的提交内容,提升团队协作效率和代码维护质。
2.Commitizen的使用
pipx install commitizen
pipx upgrade commitizen
or
brew install commitizen
>cz commit
? Select the type of change you are committing (Use arrow keys)
» fix: A bug fix. Correlates with PATCH in SemVer
feat: A new feature. Correlates with MINOR in SemVer
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 or correcting existing tests
build: Changes that affect the build system or external dependencies (example scopes: pip, docker, npm)
ci: Changes to CI configuration files and scripts (example scopes: GitLabCI)
多行输入可以使用|
pip通道,实现换行的目的,亲测有效。
3. 三方软件设置
Lazygit
通过修改 config.yaml
customCommands:
- key: "C"
command: "git cz c"
description: "commit with commitizen"
context: "files"
loadingText: "opening commitizen commit tool"
output: terminal