Skip to content

Menu

Conventional Commits Cheat Sheet: Types, Scopes and Breaking Changes

Checked against Conventional Commits Conventional Commits 1.0.0; commitlint v21.2.4 on 28 November 2026. Each section links to the official docs it was checked against.

This sheet is for teams that want commit messages a release tool can read, without memorising the spec. It follows Conventional Commits 1.0.0 and the commitlint docs (latest release v21.2.4, 18 Oct 2026). The message formats below were not checked with commitlint locally, so its rows are marked as docs only.

When to use what

The spec itself only defines two types: feat for a new feature and fix for a bug fix. Everything else you see in the wild, such as docs, refactor or chore, comes from the Angular convention via @commitlint/config-conventional. That list is a good default, and I'd adopt it as is rather than inventing team types nobody's tooling knows.

Keep scopes short and stable: a package name or an area like auth or api. A scope that changes every week is noise. Use ! after the type when the subject alone tells the story, and add a BREAKING CHANGE: footer when users need migration notes. You can use both.

If your team squashes pull requests, only the squash commit's title has to follow the format, which is far easier to enforce than every work-in-progress commit. The commit message generator drafts a compliant message from a description of the change, the semver calculator shows what the next version becomes, and the commit messages post covers subject length and trailers. Name branches to match with the branch name generator.

<type>[optional scope]: <description>

First line: type, optional scope in parentheses, colon, space, summary

From the docs, not run by us
feat(parser): accept arrays in config

New feature scoped to one area

Try it: git-commit-message-generatorFrom the docs, not run by us
fix: handle empty input in slugify

Bug fix with no scope

From the docs, not run by us
(blank line) then body

Free-form body starts one blank line after the header

From the docs, not run by us
Refs: #123

Footer: a word token, colon and space, then the value

From the docs, not run by us
Fixes #42

Footer form with space and # instead of a colon

From the docs, not run by us
Reviewed-by: Sam

Multi-word footer tokens use hyphens instead of spaces

From the docs, not run by us
fix: ...

Maps to a PATCH release

Try it: Semver CalculatorFrom the docs, not run by us
feat: ...

Maps to a MINOR release

From the docs, not run by us
feat(api)!: drop v1 endpoints

! before the colon marks a breaking change, so a MAJOR release

From the docs, not run by us
BREAKING CHANGE: config moved to app.toml

Footer that marks a breaking change; must be uppercase

From the docs, not run by us
BREAKING-CHANGE: ...

Hyphenated footer token the spec treats as the same thing

From the docs, not run by us
revert: restore old login page Refs: a1b2c3d

Suggested revert style; the spec leaves reverts to your tooling

From the docs, not run by us

Defaults of @commitlint/config-conventional: header up to 100 characters, lower-case subject, no trailing period, body lines up to 100 characters except lines with URLs.

build

Build system or dependency changes

From the docs, not run by us
chore

Maintenance that doesn't touch source or tests

From the docs, not run by us
ci

CI configuration and scripts

From the docs, not run by us
docs

Changes to documentation files only

From the docs, not run by us
perf

Change that improves performance

From the docs, not run by us
refactor

Code change that neither fixes a bug nor adds a feature

From the docs, not run by us
style

Formatting and whitespace, no behaviour change

From the docs, not run by us
test

Adding or fixing tests

From the docs, not run by us

Hook setup is from https://commitlint.js.org/guides/local-setup.html.

npm install --save-dev @commitlint/config-conventional @commitlint/cli

Install the CLI and the conventional preset

From the docs, not run by us
echo "export default {extends: ['@commitlint/config-conventional']};" > commitlint.config.js

Minimal config that uses the preset

From the docs, not run by us
npx husky init

Set up Husky v9 hooks after installing husky

From the docs, not run by us
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg

Lint every message as you commit

From the docs, not run by us
npx commitlint --from HEAD~1 --to HEAD --verbose

Lint the last commit and print a report even when it passes

From the docs, not run by us
echo "feat: add search" | npx commitlint --default-config

Check one message from stdin with the built-in conventional rules

From the docs, not run by us
npx commitlint --from-last-tag

Lint everything since the last tag, useful in a release job

From the docs, not run by us

Worked example: Work out the next version from a week of commits

Your last release is 2.4.1 and these commits landed since:

fix(auth): refresh token before expiry
docs: explain rate limits
feat(search): filter by tag
refactor(db): split query builder

feat(api)!: return ISO dates

BREAKING CHANGE: `createdAt` is now an ISO 8601 string, not a Unix timestamp.

Read them from the highest impact down. The last commit has ! and a BREAKING CHANGE footer, so the next release is a major one, 3.0.0, no matter what else is in the batch. Without it, the feat(search) commit would make it 2.5.0, and with only the fix it would be 2.4.2. The docs and refactor commits don't bump anything on their own; release tools usually leave them out of the changelog or list them in a minor section. The footer text is what ends up under a breaking-changes heading, so write it for the person upgrading, not for your reviewer.

Common mistakes

  • Writing Feat: Add search. and having commitlint reject it.

    The preset wants a lower-case type and subject and no trailing full stop: feat: add search.

  • Putting breaking change: in lower case in the footer.

    The spec requires BREAKING CHANGE in upper case; the other parts are case-insensitive.

  • Labelling a behaviour change as refactor so it doesn't bump the version.

    If users notice it, it is a fix or feat, and if it breaks them it needs ! or a breaking-change footer.

  • Assuming chore and docs are part of the spec and that every tool accepts them.

    Only feat and fix are defined by the spec; other types come from your commitlint config, so document the list for your team.

  • Using the wrong type and pushing it to main.

    Before merging, reword it with git rebase -i; after a release, fix the changelog by hand rather than rewriting shared history.