DEV Community

Thiago
Thiago

Posted on

5 1

Conventional Commits

Sometimes it's hard to always write simple and clean commits, but we have a simple npm package called git-cz or commitizen wich help us to write better commits:

https://www.npmjs.com/package/git-cz
https://www.npmjs.com/package/commitizen

Follow the instructions at the page above and with a simple command as: git cz at your terminal you'll have the following options:

Image description

I choosed the feat option:

Image description

Now, I add more information

Image description

Then it asks if your code has some BREAKING CHANGES or close any issue

Image description

And this is the result:

Image description

Obviously you can follow the instructions here of how to write better commits https://www.conventionalcommits.org/en/v1.0.0/ but it is very useful to have a little automate help

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (1)

Collapse
 
shreyas-a-s profile image
Shreyas A S

I'm kinda a manual guy when it comes to commit messages. Somehow, manually writing good commit messages gives me a bit of satisfaction. 😌

Learning about conventional commit messages were a game-changer to my git life IMO. And if a tool helps everybody write good conventional commit messages by automating them and reducing the mental friction in doing so, I'm all for it. ✨

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs