You were almost certainly thinking "WHY is this like this?", not "What is a one-line summary of what happened in this commit?".
Most commit messages are next to useless because they focus on WHAT was done instead of WHY.
This is exactly the wrong thing to focus on.
You can always reconstruct what changes a commit contains, but it's near impossible to unearth the reason it was done.
(thread)
You were almost certainly thinking "WHY is this like this?", not "What is a one-line summary of what happened in this commit?".
```
[one line-summary of changes]
Because:
- [relevant context]
- [why you decided to change things]
- [reason you're doing it now]
This commit:
- [does X]
- [does Y]
- [does Z]
```
First, it captures context that will be near impossible to recover later. Trust me, this stuff is gold.
Secondly, if you train yourself to ask why you're making every change, you'll tend to make better changes.
The first time you see a commit message like the above instead of "refactor OrderWidget", you'll be a convert.
https://t.co/8e9p3x0zb0
https://t.co/KrOvHJPMXg
https://t.co/rnWpApDrTx
https://t.co/R7tAV3b8rx