How changing my commit messages made me more productive

Confession. I sucked at writing commit messages. Messages like Fix, Style Things and Fix Again #yolo where common place. This did not really matter much as I was working by myself at the time, but I knew I had to start building a habit of writing better commit messages. But every time I started looking on the interwebs I found suggestions to write a heading, a proper body and some foot notes. I understand where this is useful, but working mainly on line of business applications and committing often made it seem like more of a chore than anything else.

Then someone at work shared this post about semantic commit messages.

"Now that's something I can get behind", I thought to myself. Short, sweet and easy to remember.

What really caught me off guard was that it made me a lot more productive.

Huh? You do it at the end how does it make you more productive?

Here's what happens. Writing the prefix forces you to commit only the work related to the one thing you should be doing. Either a Feature or a Fix or a Style Change etc. So I automatically start thinking about my commit message before I start working with the code. This means that when I start working with the code, I am focused on exactly what needs to be done and only that. Then I just do it. I get it done, commit and hop on over to whatever is next.

I also get a nice looking commit history that is easily readable and I leave bigger breadcrumbs for those that come after me.

This is also a great first step to eventually writing more detailed commit messages.