Help Your Future Self in Your Commit Messages
09 Feb 2015
Every now and then I join a new project and soon enough learn that devs
are using some VCS but being incredibly wasteful at doing so.
They’ll make some changes, hopefully run tests, build, check, and, if
things are good enough, commit. So far, so good, if it weren’t for the
fact that they’re also doing a great disservice for their future selves
by being careless about what they add to that commit message.
There are lots of good articles on writinggoodcommit
messages and so I won’t just repeat them. In the good spirit of
free software, I’ll stand on the should of others and try build on
top of that by providing real examples of commit messages I’ve seen on
previous projects and the reasons why they hurt developers instead of
There are lots of things that might seem obvious to you at the time you’re
changing a particular piece of code, but they will mostly likely not be that
obvious - or even make sense at all - a few days, weeks, or months in the
future. Make sure you’re kind to your fellow developers and to your future
self and give them all the context you currently have on this change. Code
quality is measured in WTFs/m and good code not only will get fewer
WTFs from you but will also explain to you the reason behind the question in
its commit messages!
Those who cannot remember the past are condemned
to repeat it. (George Santayana)