Hey everyone,
During a pair programming session with Hooman a while back, we briefly discussed commit messages. Basically I was writing everything in past tense when it is more appropriate to stick to the present tense.
I work regularly in Mercurial (HG), and my Git work is more recent just for Outpost Universe purposes. I was using Subversion (SVN) a fair amount for Outpost Universe work, although that may lessen now that we are looking at GitHub.
Anyways, besides switching to present tense for the subject of the commit message, I was wondering what other best practices there are, especially if they can be applied across different types of version control.
One of the top Google hits was by a programmer named Chris Beams.
https://chris.beams.io/posts/git-commit/. I've never heard of him before but Google made it a top hit and his writing is easy to follow.
From his article:
The seven rules of a great Git commit messageKeep in mind: This has all been said before. * Separate subject from body with a blank line
* Limit the subject line to 50 characters
* Capitalize the subject line
* Do not end the subject line with a period
* Use the imperative mood in the subject line
* Wrap the body at 72 characters
* Use the body to explain what and why vs. how
I'm going to try improving my commit messages by following these suggestions. I'm not actually sure some of them matter for HG, like wrapping at 72 characters. (I typically use TortoiseHg and TortoiseGit, which both are nice enough to automatically wrap text).
If someone in the community has a differening set of best practices they typically follow for commit messages, I would be interested in reading up on it.
-Brett