This post represents a conversation I’ve had multiple times with the dev teams I am involved with, and it doesn’t seem to get any better. I’ve “vented” at my wife, who has to listen (It said so in the vows!) but she just beams a beautiful smile back (something that the dev teams don’t do I may add!).
Commit messages really should be meaningful to all who view it.. It might be funny to put messages such as:
commit ce87f8b133f6047ded002d69bd1b2ccf27ab691a
Author: Funny Developer <fail@localhost>
Date: Fri Jan 13 Stupid O’clock 2012 +0000
![]()
But, seriously, is that going to help me try to understand how to unpick the mess you have now got the project into? Does that link to the work you were doing, so I can now try to figure out how to fix it correctly? Does that actually do anything other than bring deep resentment to the developer who wrote it?
Another favourite is 4 commit messages for one piece of work that goes something like:
commit ce87f8b133f6047ded002d69bd1b2ccf27ab691d
Author: Funny Developer <fail@localhost>
Date: Fri Jan 13 Stupid O’clock 2012 +0000More code review feedback
commit ce87f8b133f6047ded002d69bd1b2ccf27ab691c
Author: Funny Developer <fail@localhost>
Date: Fri Jan 13 Stupid O’clock 2012 +0000Code review feedback
commit ce87f8b133f6047ded002d69bd1b2ccf27ab691b
Author: Funny Developer <fail@localhost>
Date: Fri Jan 13 Stupid O’clock 2012 +0000Small tweak to make it actually work
commit ce87f8b133f6047ded002d69bd1b2ccf27ab691a
Author: Funny Developer <fail@localhost>
Date: Fri Jan 13 Stupid O’clock 2012 +0000Made it work as per requirement
I really don’t need to see that it took 2 code reviews to finally get this onto the project branch, nor do I need to know you needed to make a “small tweak” that included all the original files to make it work.
What would be smashing:
commit ce87f8b133f6047ded002d69bd1b2ccf27ab691f
Author: Mr Committer <winning@localhost>
Date: Fri Jan 20 17:00:00 2012 +0000Make sure the customer can view all recent invoices, not just the last 5.
http://internal.tracking-system.net/TICKET-ID
Fabulous, a message that makes sense, I know what you wanted to achieve and for pure historical value a link to why you were doing the work, so I can track things should I need to. How excellent is that?
I think I know the reason why people don’t understand why this is important – It’s because they have never been put into a situation where they have to solve a version control issue at the last minute, where the buck stops with them, and they have to sort it before the project goes into production. If they ever had to do it, they would have this same conversation with other developers who don’t write decent commit messages.