Bad examples of commit messages

As we all should know by now, VCSs (version control systems) are pretty useful. Not only that you can use it to share and edit files with a group of people, you also have a history which lets you follow changes to your files.

For this you need to commit to the repository. For each commit you should add a short description of what you did, so you can find the apropriate changesets later or maybe generate a history more or less automatically.

One thing I see from time to time are log entries like:

  • -
  • (nothing)
  • $Task_he_is_working_on
  • changes
  • update
  • Bugfix

And many more comments that tell you nothing or almost nothing what changed in this commit.

Arguments like “It hasn’t really changed something” are nonsense. Consider you have not really changed something, why are you committing it? So there is always something that change, so just write it down.

Examples of much better comments:

  • capitalization change of xyz
  • formatted code
  • added first part of $Task_he_is_working_on, now you can save data
  • refactored code, switched from x to y
  • Fixed bug #1234 (needed to check for null value)

These are of course not the best possible comments but they would help a lot if they would be used instead of an empty comment or “update”.

So I beg to all of you developers out there, when you commit something please write something useful what you did. If you don’t have to say something about the stuff you are committing you should consider to not commit it because it seems to be not useful at all.

Comments are closed.