p:: Git
When you commit with Commitizen, you’ll be prompted to fill out any required commit fields at commit time. No more waiting until later for a git commit hook to run and reject your commit (though that can still be helpful). No more digging through CONTRIBUTING.md to find what the preferred format is. Get instant feedback on your commit message formatting and be prompted for required fields.
Conventional commit messages as a global utility
Install commitizen
globally, if you have not already.
Install your preferred commitizen
adapter globally (for example cz-conventional-changelog
).
Create a .czrc
file in your home
directory, with path
referring to the preferred, globally-installed, commitizen
adapter
You are all set! Now cd
into any git
repository and use git cz
instead of git commit
, and you will find the commitizen
prompt.
Pro tip: You can use all the git commit
options
with git cz
. For example: git cz -a
.
If your repository is a Node.js project, making it Commitizen friendly is super easy.
If your repository is already Commitizen friendly, the local commitizen
adapter will be used, instead of globally installed one.
Making your repo Commitizen friendly
Initialize your project to use the cz-conventional-changelog adapter by typing:
Or if you are using Yarn:
If your repo is Commitizen friendly: