Member-only story
Be zen with your commit messages thanks to Python
commitizen at your rescue!
When several people are working together on a project, it is important that communication and documentation are well established. Git commit messages are a reflection of these two aspects. Conventions to write commit messages are crucial across a team to help the understanding of changes made in the project.
It’s in this spirit that some large-scale open-source projects have established best practices that have become widespread. I’m thinking here of the Angular project, which has established a convention for its commit messages. Later, this convention gave rise to a standard called Conventional Commits. It is one (good) way to organize commits if you don’t want to think too much about this concern.
To enforce Conventional Commits, there is a nice Python tool called commitizen, and it will be our focus for the rest of this article.
Also, you will need to have some basic knowledge of Git manipulation to follow this article. If this is not the case, you can read this article.
Installation
To install commitizen, you can use pip or your favorite package manager. Note that commitizen starts working with Python 3.7 or higher and Git 1.8.5.2 or higher.
$ pip install commitizen
#…