2.9 Commit message hygiene
In short: A commit message is a note to future you and to reviewers.
A commit message is a note to future you and to reviewers.
Good habits
- Use the imperative mood: "Add health check", not "Added" or "Adds".
- Keep the first line short (about 50–72 characters).
- Explain why in the body when the change is non-obvious.
- One logical change per commit when you can.
| Weak | Stronger |
|---|---|
update |
Fix health check path for load balancer |
final changes |
Add .gitignore for .env and node_modules |
asdf |
Document how to run badge API hello locally |
Tiny example body:
Add GET /health for badge API hello API
Load balancers need a cheap endpoint that does not hit the database.