Commit messages are worthless

Commit messages written in rush tend to be less than helpful.

A couple of years ago I wrote about how I hoped that writing good commit messages is worthwhile. It never paid off.

Turns out it’s never my commit messages I’m reading. It’s my coworkers' messages, or open-source contributors’ messages. It’s not enough that you write good messages, you need to foster a culture of good commit messages in all the projects you work with.

Even people who write good commit messages most of the time sometimes create commits with messages like “make it work” or “WIP” or “blargh”. For some reason it’s always these commits that contain the mysterious bugs or the unclear code.

Even if you do write good commit messages, if you use GitHub, it’s likely that nobody reads the messages. GitHub’s user interface isn’t designed for reading commit messages. When you do a pull request, the commit titles are in small font and the bodies are hidden. If you use GitHub, it’s better to spend time on writing good pull request messages. They do get read.


Comments or questions? Send me an e-mail.


Want to get these articles to your inbox? Subscribe to the newsletter: