順序:
最近、コードを提出するときに、各提出のコード記述が不均一であることがわかりました。これにより、人々は特に面倒に感じます。第一に、このプログラマーは「通常の」バックグラウンドを持っていないように思われ、コードをバックトラックするときに手がかりがないように思わせます。
コミットをインストール
npm install commitizen
yarn add commitizen
設定コマンド
インストールが完了したら、対応するプロジェクトの package.json フォルダーの下に次のコマンドを追加します。
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
追加後、コントロール パネルで git cz コマンドを入力すると、対応する commitizen サブミッション仕様の手順が次のように表示されます。
git cz
? Select the type of change that you're committing: (Use arrow keys)
❯ 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
feat: A new feature
壮举:新功能
fix: A bug fix
修复:错误修复
docs: Documentation only changes
docs:仅文档更改
style: Changes that do not affect the meaning of the
样式:不影响代码含义的更改(空格、格式、缺少分号等
refactor: A code change that neither fixes a bug nor
重构:既不修复错误也不添加功能的代码更改
perf: A code change that improves performance
perf:提高性能的代码更改
test: Adding missing tests or correcting existing tests
测试:添加缺失的测试或纠正现有的测试
build: Changes that affect the build system or external dependencies
build:影响构建系统或外部依赖项的更改
ci: Changes to our CI configuration files and scripts
ci:对我们的 CI 配置文件和脚本的更改
chore: Other changes that dont modify src or test
杂项:不修改 src 或测试文件的其他更改
revert: Reverts a previous commit
还原:还原以前的提交
バグを修正する場合、最初のステップは修正オプションを選択することです: fix
In the second step, a Specify a scope will appear: it means that the modified folder is that part. I always choose src/home/banner... etc. これらのフォルダは、変更されたディレクトリを選択できます
3 番目のステップでは、簡単な説明を書きます。これは、簡単な説明を書くことを意味します。私は通常: 変更...バグなど.
残りのオプションについては、Enter キーを直接押すことができます. 最終的なコミット情報は次のとおりです: fix(src/home/banner): Modified...bug. とてもクリアに見えますか!