Introduction
- I often get lost when entering a commit message
- Commit messages are not unified and not simple
Due to such concerns, I have introduced Commitizen this time.
What is Commitizen?
Official page
https://github.com/commitizen/cz-cli
Type 'git cz' to see your choices.
It's a tool that allows you to create simple and easy-to-understand commit messages just by answering interactively.
How to install Commitizen
Type this commands
npm install commitizen -g
npm install -g cz-conventional-changelog
echo '{ "path": "cz-conventional-changelog" }' >> ~/.czrc
exec $SHELL -l
How to use Commitizen
Start with the 'git cz' command.
git cz
This time I just added README.md, so select 'docs'.
I was asked for the scope of this change, so type in 'README.md'.
Then enter a short description.
This time I typed 'add README'.
Then enter a long description.
I didn't need a detailed explanation this time, so I skipped it with Enter Key.
I was asked if there were any breaking changes, but this time it's no.
I was asked if it was related to the issue, but this is No.
That's it.
Let's see what kind of commit message was created.
docs (readme.md): add README
Conclusion
That's how to use Commitizen.
Thank you for watching.
Please follow me on Twitter.
If you have a project, please contact me on Twitter.
https://twitter.com/n199603
Top comments (1)
thank you!