A well-formed commit message has three parts:
type(scope): short summary in imperative mood
A longer body wrapping at 72 chars that explains *why* this
change exists, not what it does. The diff already shows what.
Refs: #123
Co-authored-by: Other Dev <other@dev>
Rules of thumb:
- Subject line ≤ 50 chars, imperative ("Add", not "Added"), no trailing period.
- Blank line between subject and body — many tools rely on it.
- Body wraps at 72 so it reads cleanly in
git log.
- Trailers at the bottom:
Co-authored-by:, Signed-off-by:, Fixes:, Refs:.
git commit with no -m opens your editor for the full multi-line form. git commit -v includes the diff in the editor — invaluable.