Why Conventional Commits
The Conventional Commits spec standardises commit messages as type(scope): description. Semver automation reads these to decide major (breaking), minor (feat) and patch (fix) bumps; changelog tools group by type; and reviewers can scan history at a glance.
Writing a good subject
- Imperative mood: "add", "fix", "update" — as if commanding the codebase. Git itself uses this ("Revert", "Merge").
- Under 50 characters where possible; GitHub truncates longer subjects in lists.
- Say what, not how: "add rate limiting" not "add while loop with sleep".
- Scope names the module touched:
feat(api):,fix(auth):— pick a scope per area and reuse it.
Body and footers
The body explains why (the problem) and any trade-offs; one line per point keeps diffs reviewable. Footers carry machine-readable data: BREAKING CHANGE: … and issue refs like Closes #42. If your repo uses a template (e.g. PR templates), mirror its footer conventions here.