All cheat sheets

Conventional Commits Cheat Sheet

Conventional Commits spec: types, scope, breaking changes, and examples.

Version Control
conventional-commits
git
semver

Conventional Commits gives commit messages a predictable structure that tools can use for changelogs and release versioning. A good message names the user-visible or maintenance change without repeating implementation noise.

Commit format

The required header is type, an optional scope, a colon, and a concise description. A blank line may separate the header from a body and footers.

text
type(scope): description

Optional explanation of context and behavior.

Optional-Footer: value
text
feat(search): support filtering by file extension
Table
PartRule
typeShort category describing the change.
(scope)Optional noun describing the affected area.
:Required separator after type or scope.
descriptionShort imperative-style summary; avoid a trailing period.

Common types

Types are conventions rather than a closed keyword list, but these names work well with release tooling and team guidelines.

Table
TypeTypical meaning
featAdd user-visible functionality.
fixCorrect a defect.
docsDocumentation-only change.
styleFormatting or whitespace with no behavior change.
refactorRestructure without changing behavior.
perfImprove performance.
testAdd or correct tests.
buildBuild system or dependency changes.
ciContinuous integration configuration.
choreMaintenance outside production behavior.
revertRevert an earlier change.

Scope and description

Scope is optional and should be stable enough to help readers filter history. Use a specific area such as api, parser, or checkout, not an internal file name that changes frequently.

text
fix(api): reject malformed pagination cursors
refactor(parser): separate tokenization from validation
ci: cache pnpm store in pull request jobs

Prefer an imperative, lowercase description: “add”, “fix”, or “remove” rather than “added”, “fixes”, or “we changed”. Keep the first line easy to scan in logs.

Body and footers

The body explains why a change exists, important tradeoffs, or migration details. Footers use token/value syntax and are useful for issue links, reviewers, or release automation.

text
fix(cache): avoid serving expired entries

The previous lookup returned stale values when the refresh worker was
busy. Check the expiry timestamp before returning the cached response.

Closes #123
Reviewed-by: Platform Team
Table
FooterExample
Issue closureCloses #123
ReferenceRefs #456
Co-authorCo-authored-by: Name <email>
Custom metadataReviewed-by: Team

Breaking changes

Mark an incompatible API or behavior change with ! after the type or scope, and explain it in the body or a BREAKING CHANGE: footer. The footer token is case-sensitive in the specification.

text
feat(api)!: replace offset pagination with cursors

BREAKING CHANGE: clients must send a cursor returned by the previous page.
text
refactor(parser)!: remove legacy token names

SemVer mapping

When commits drive releases, a common mapping is fix to PATCH, feat to MINOR, and any breaking change to MAJOR. The project’s release tool may apply additional rules.

Table
Commit signalSemVer effect
fixPATCH: backward-compatible bug fix.
featMINOR: backward-compatible functionality.
! or BREAKING CHANGE:MAJOR: incompatible public change.
Other typesUsually no release bump by themselves.

Examples

text
feat: add dark mode toggle
fix(ui): preserve focus after copying text
docs: clarify local development setup
perf(parser): reduce repeated allocations
test: cover empty input behavior
revert: revert "feat: add dark mode toggle"

References