Photo by lowjumpingfrog
Writing a commit messages is like telling a joke without a punchline. While writing these messages may be tedious at times, I’ve found their presence invaluable over the years.
Having worked with source control management system, you may be intimately familiar with the commit dialog. That annoying dialog that has an endless craving for prose. Usually a commit message is encourage, but not required. However, I’ve seen some team environments where a minimum character length was enforced by the source control management system!
As developers, the decisions to enforce such policies are usually out of our control, but honestly, this is one policy I can support. At first glance, it would seem like writing detailed commit messages is just another one those administrative tasks with no tangible benefits.
I’ve found the that detailed commit messages have saved me countless hours over the years when the need to hunt down changes in the version control history. Common source control client tools like TortoiseSVN, Git, Perforce, and TFS include features to browse changeset history, which will contain the comments written by another developer.
Browsing version control history (with detailed changset descriptions) it becomes very easy to understand the holistic reasoning behind code changes in a way that in-line commenting can not provide. Often times when a bug is reported, being able to isolate an issue to a changeset, a set of modified files, will dramatically reduce the time it takes to find, test and implement a fix.
As a project grows and becomes more complex, as does the time it takes for new developers to learn their way through the labyrinth of the code-base. Having the ability for new developers to learn by example based on changeset revisions is a boon for all involved.
When it comes times to release your software, you generally want to communicate to your customers what features and fixes are in the latest version. Having details commit messages, is a great starting place for creating release notes for the marketing department.
Depending on your development environment, there are many tools that exist to help automate the task of creating commit messages based on an item of work that may exist in an external project management application. A few of these tools which integrate with TortoiseSVN can be found on their issue tracker integrations page.