The Conventional Commits format, seven rules, real examples, and a free generator.
A good commit message answers two questions: what changed and why. The diff already shows how. This guide covers the Conventional Commits format, shows real examples, and links a free generator so you never start from a blank commit message again.
type(scope): subject
body
footer
feat, fix, docs, refactor, test, chore, perf, build, ci, revertauth, api, uiBREAKING CHANGE:) and issue references (Closes #123)feat(auth): add rate limiting to the login endpoint
prevents brute-force attacks on user accounts
adds a 5-requests-per-minute limit per IP
returns 429 with a Retry-After header when exceeded
Closes #142
fix(parser): handle null values in nested config
the parser threw on null children of a config node;
now treats null as an empty object and continues
feat(auth)!: require CAPTCHA token on login
BREAKING CHANGE: the login endpoint now requires a
`captcha_token` field in the request body.
docs: clarify the API rate limit in the README
| Type | Use it when… |
|---|---|
feat | you add a new feature for the user |
fix | you patch a bug |
docs | documentation only (README, comments) |
style | formatting, whitespace (no logic change) |
refactor | restructure code without changing behavior |
perf | improve performance |
test | add or fix tests |
build | build system or dependencies |
ci | CI pipeline configuration |
chore | tooling, config, misc |
revert | revert a prior commit |
Conventional commits aren't just style. They let tooling auto-generate changelogs, auto-bump semantic versions (feat: → minor, fix: → patch, !/BREAKING CHANGE: → major), and make a large codebase's history greppable: git log --grep "^fix(" finds every bug fix.
Don't want to format it by hand? Our free generator turns a plain-English description of your change into four clean variants — standard Conventional Commit, breaking-change shorthand, a minimal header, and a gitmoji-styled version. No signup, no cost.
Open the Commit Message Generator →