Why I enjoy conventional commits

Patrick Wendo - Jun 16 '22 - - Dev Community

If you don't know about conventional commits, I would ask you to check them out here, but the gist of it is that, it is a standard way to structure your commit messages such that they are easier to understand at a glance. For instance, say you removed some logs that you had lying around in your code base, instead of writing a commit saying

minor changes
Enter fullscreen mode Exit fullscreen mode

I normally write

chore(NameOfBranch): code cleanup, removing logs
Enter fullscreen mode Exit fullscreen mode

This makes it easier for the person reviewing the code to know that I was not implementing a feature, I was just removing the logs.

Similarly for a new feature you could have a commit message that says

feat(NameOfBranch): <an explanationon your feature>
Enter fullscreen mode Exit fullscreen mode

I find that this is more legible to track the progress of my work.

But why do I love conventional commits? Well its simple really, it makes me think just a bit harder about what I have done. It's a good mental check for me before I push my changes and open a PR. And I find that that pause to think moment really keeps me going.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .