Improve your Git Commit workflow

The following steps lead you to improve your git commit messages as well as automating changelog and versioning.



  • husky will trigger the commitlint on each commit
  • commitlint checks if your commit messages meet the Conventional Commits format
  • commitizen and cz-conventional-changelog helps format commit messages with a series of prompts
  • standard-version will update, bump the version and generate a new tag

Step 1 — Install husky, commitlint, cz-conventional-changelog, and standard-version locally

yarn add --dev husky @commitlint/cli @commitlint/config-conventional cz-conventional-changelog standard-version

Step 2 — Install commitizen globally

sudo yarn global add commitizen

Step 3 — Update package.json

"scripts": {
"release": "standard-version"
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog",
"disableScopeLowerCase": true

Step 4 — Create a commitlint.config.js file in your project root directory

module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-case': [0],

Step 5 — Configure commitizen

commitizen init cz-conventional-changelog --save-dev --save-exact


Basically, instead of typing git commit now you type git cz which will open a wizard and help you write a standardized message.

Commitizen template
Commitizen template
Commitizen template

Commit with commitizen

Using commitizen to prompts a wizard

git add .
git cz
yarn release
git push --follow-tags

Pro tip

Run this command in your first release to prevent bumping the version in package.json

yarn release --first-release

Normal commit command

You can still use git commit ... but the commit will fail if the commit message is not properly formatted.

git add .
git commit -m "feat(blog): add comment section"
yarn release
git push --follow-tags

Commit but skip changelog, bump version, and tag

git add .
git cz
yarn release --skip.changelog --skip.bump --skip.tag
git push



With these four packages, you can easily write meaningful commit messages with Conventional Commits. Besides, you will get the changelog automatically generated and with the correct version numbers. All this without any effort. This is awesome.

This article helped you? Please consider giving a few claps 👏.

Frontend Engineer | Remote Worker | Main focus on JavaScript and React but I also love PHP | Coding is awesome! |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store