- All the TODOs
- Applicable Nota Bene's (you know, "this breaks in X")
- Whether or not I'll be distracted before completing the task with something else that would need a different summary.
Yes, I know what it will do, but a good commit message isn't a generic one-liner that describes it beforehand. What you are looking for is "task driven development".
False. "Task Driven Development" (notice the quotes?) is not about how I write something. That is decided elsewhere. Same for workflow. My commit messages don't dictate either of those.
Here is an example task I completed yesterday:
#1982: Automatically update events widget
That, to the uninitiated, means diddly-squat. It ended up being "write a wordpress shortcode plugin that hooks into our API for event retrieval". The commit message was as follows:
SG Shortcode
Instructions coming. Depends upon APC being enabled for caching to
work properly. Triggered through the use of `[events]` shortcode
I then had a few cleanup commits, and some calibration of things such as curl timeout, apc cache length, and shortcode option support. I also added some documentation of the feature to our internal wiki and sent out an email to the people who would end up using the feature. I'll probably end up yelling at one of them today to see how he's using it.
How I write something was largely irrelevant in the beginning, so long as it completed the task. In this instance, there was a bit of back and forth in the github issue concerning the implementation, but for smaller things there usually isn't any back and forth. The scope of the task and the depth of it's affects should drive the workflow around your development, not a commit message you through together on the off-chance that the task is still relevant at the end of the day.
If you have a large enough task that you are using commit messages to plan out how a feature will work, you're gonna have a bad time. You might want to start chunking your work into smaller, more manageable, testable components, otherwise whatever the hell you ended up writing is going to be full of failboat.