Conventional Commits Cheat Sheet: Types, Examples, and Commit Message Best Practices
Guide

Conventional Commits Cheat Sheet: Types, Examples, and Commit Message Best Practices

Felix Macx · · Updated · 11 min read

Conventional Commits is a small rule for how to write a commit message — type(scope): description — that makes your git history readable by people and parseable by tools. This page is the cheat sheet first and the guide second: every type with examples, the formatting rules worth following, and how to adopt it without a fight.


Jump to: The format · Types cheat sheet · Scopes · Breaking changes · Commit message best practices · Before and after · What it unlocks · Adopting it

The format in one screen

<type>(<optional scope>)<optional !>: <description>

<optional body>

<optional footer(s)>

A complete example, using every part:

fix(webhook): retry failed deliveries up to 3 times

Deliveries that hit a 5xx were dropped after the first attempt,
so a short outage on the receiving side lost events for good.
Retries now back off at 1s, 10s, and 60s before giving up.

Refs: #482

The rules that matter, from the specification:

  • The type is a noun followed by a colon and a space. feat and fix are the two the spec defines; any other type is allowed.
  • The scope is optional, goes in parentheses, and names the part of the codebase: feat(api):.
  • The description is a short summary on the same line.
  • The body is optional and starts after one blank line.
  • Footers are optional, start after another blank line, and look like Token: value — Refs: #482, Reviewed-by: Dana.
  • A breaking change is marked with ! before the colon, a BREAKING CHANGE: footer, or both.

Conventional commit types cheat sheet

The spec only requires feat and fix. The rest of this list is the Angular convention, which is what the @commitlint/config-conventional preset enforces and what most teams mean when they say “conventional commits”.

Type Use it for Version bump In the changelog by default
feat A new capability users or API consumers can use Minor Yes — Features
fix A bug fix Patch Yes — Bug Fixes
perf A change that makes something faster or lighter without changing behaviour Patch in semantic-release’s default rules Yes — Performance Improvements
revert Reverting an earlier commit Patch in semantic-release’s default rules, when the message keeps git’s This reverts commit <hash> line Yes — Reverts
docs Documentation only None No
style Formatting, whitespace, semicolons — no change in meaning None No
refactor Restructuring code without fixing a bug or adding a feature None No
test Adding or correcting tests None No
build Build system or dependency changes None No
ci CI configuration and scripts None No
chore Anything else that doesn’t touch source or tests None No

Any type becomes a major bump when it’s marked as a breaking change. One catch: semantic-release’s default angular preset only recognises the BREAKING CHANGE: footer, not the !. If your team uses feat!:, switch it to the conventionalcommits preset — the semantic-release guide shows the two lines to change.

The last two columns describe tool defaults, not the spec. The spec only says that fix correlates with a patch, feat with a minor, and a breaking change with a major in semantic versioning, and that other types have no implicit effect on the version. The bump column reflects semantic-release’s default rules; the changelog column reflects conventional-changelog’s conventionalcommits preset, which shows feat, fix, perf, and revert and hides the rest. Both are configurable.

One example of each, so you can pattern-match:

feat(export): add PDF format to dashboard exports
fix(auth): stop logging out users when the token refreshes
perf(db): batch dashboard queries to cut load time
revert: feat(export): add PDF format to dashboard exports
docs(api): document the rate-limit headers
style: format with prettier 3
refactor(billing): extract invoice totals into a service
test(webhook): cover the retry backoff
build(deps): bump react from 18.2 to 18.3
ci: cache node_modules between runs
chore: remove the unused legacy theme folder

Which type do I pick?

The three that cause arguments:

  • fix or feat? If a user would describe it as “that was broken and now it works”, it’s a fix. If they’d say “I couldn’t do that before”, it’s a feat. A small improvement to an existing feature is still a feat.
  • refactor or fix? If behaviour changed for anyone, it’s not a refactor. Refactors that quietly fix a bug should be committed as the fix, because that’s the part users need to hear about.
  • chore or build? Dependency bumps and bundler config are build. chore is the bucket for housekeeping that fits nowhere else. Don’t lose sleep over this one — neither appears in a changelog.

When a commit honestly covers two types, that’s usually a sign it should be two commits.

Scopes

A scope narrows the type to an area: feat(api), fix(dashboard), refactor(auth). It’s optional, and it’s the only part of the format your team has to invent for itself.

What works:

  • Pick scopes from the product’s vocabulary, not the folder tree. billing and export survive a restructure; src-lib-utils doesn’t.
  • Keep the list short and written down. Ten to fifteen scopes in CONTRIBUTING.md is plenty. commitlint can enforce the list with its scope-enum rule.
  • In a monorepo, use the package name. Release tools can then tell which package a commit belongs to.
  • Leave it out when a change is truly global. style: format with prettier 3 doesn’t need a scope.

Breaking changes

Two ways to mark one, and you can use both together:

feat(api)!: rename user.email to user.primaryEmail

BREAKING CHANGE: user.email has been renamed to user.primaryEmail.
Clients reading user.email must switch to the new field.
  • The ! goes right before the colon, after the scope if there is one. It’s the part people see in a one-line log.
  • The BREAKING CHANGE: footer must be in capitals and carries the explanation. Release tools copy that text into the changelog, so write it for the person who has to migrate.

A breaking change can ride on any type — refactor!: and build!: are both legitimate — and it always means a major version.

Git commit message best practices

Conventional Commits fixes the shape of the first line. These habits fix everything else, and they apply whether or not you adopt the convention.

1. Follow the 50/72 rule. Keep the subject to about 50 characters and wrap the body at 72. Git’s own documentation recommends a summary line of no more than 50 characters followed by a blank line, and the 72 comes from leaving git room to indent the body inside an 80-column terminal. The subject then fits in git log --oneline, in pull request titles, and in every tool that truncates; the body stays readable in a terminal. With a type(scope): prefix eating into the line, many teams relax the subject limit — commitlint’s conventional preset allows up to 100 characters for the whole header — but shorter still reads better.

2. Write the subject in the imperative mood. “Add retry to webhook deliveries”, not “Added” or “Adds”. A good test: the subject should complete the sentence “If applied, this commit will…”. It’s also how git writes its own messages (“Merge branch…”, “Revert…”).

3. Leave a blank line after the subject. Git treats the text up to the first blank line as the commit title. Without the blank line, tools run the subject and body together.

4. Use the body to explain why. The diff already shows what changed. The body is for what the diff can’t show: what was wrong, why this approach, what you ruled out. Two sentences are often enough, and they’re the two sentences someone will be grateful for in a year.

5. One logical change per commit. A commit that fixes a bug, renames a module, and bumps a dependency can’t be reverted cleanly, can’t be described in one line, and can’t be given one type.

6. Reference the issue in a footer. Refs: #482 or Closes: #482 keeps the subject free for words and gives tools something to link.

7. Don’t end the subject with a period, and keep the description lowercase after the type. Both are what commitlint’s conventional preset enforces. (The classic advice for plain commit messages is to capitalize the subject; with a type prefix in front, lowercase is the convention.)

8. Agree on one format and enforce it with a tool. A convention that relies on people remembering lasts about three weeks. That’s what commitlint is for.

Before and after

Instead of Write
fixed bug fix(checkout): apply discount codes before tax
updates feat(search): filter results by date range
wip refactor(auth): split session handling out of the router
changed api stuff feat(api)!: return ISO 8601 timestamps instead of epoch seconds
bump deps build(deps): bump express from 4.19 to 5.0
PR feedback Squash it into the commit it belongs to

The right-hand column isn’t longer for the sake of it. Each line answers the two questions a reader has — what kind of change, and to what — before they open the diff.

What It Unlocks

The payoff isn’t the commits themselves — it’s what becomes possible downstream.

Automated changelog generation. Tools can parse your commit history and produce a structured changelog grouped by type. feat commits go in the Features section, fix commits in Bug Fixes, breaking changes get their own prominent section.

Semantic versioning decisions. A fix commit implies a patch version bump. A feat commit implies a minor version bump. A breaking change implies a major version bump. Tools can compute the next version from commits alone.

Release note generation via AI. Once commits are structured, feeding them into an AI tool to generate user-facing release notes becomes dramatically more reliable. The tool knows feat(dashboard): add PDF export is a feature to highlight and chore(deps): bump lodash is probably not.

CI decisions and alerts. Breaking changes can trigger different review requirements. Security-sensitive scopes can require specific sign-offs. All of this becomes possible when commit type is machine-readable.

Git history as documentation. Six months later, finding “when did we change how exports work” becomes grepping for feat(export) or fix(export) instead of reading 400 commit messages.

How to Adopt It Without Breaking Your Team

The biggest barrier to adoption isn’t the spec — it’s the social contract. Your team needs to agree to write commits differently, and inconsistent adoption is worse than no adoption.

Start with a lightweight enforcement mechanism. Install commitlint with the @commitlint/config-conventional preset. Add a Husky commit-msg hook or a CI check that runs commitlint against new commits. Now commits that don’t match the convention fail immediately — no remembering, no debating. The setup is about 15 minutes, and the commitlint guide walks through it, including what to lint when you squash-merge.

Teach the types once, not continuously. Put a short cheat sheet in your CONTRIBUTING.md or README — the table above will do. Hold a 15-minute team discussion to agree on scope names (this is the only genuinely ambiguous part). Then leave the tooling to enforce the rest.

Grandfather old history. You don’t need to rewrite existing commits. Start the convention from a specific date forward. Any automation you build can simply ignore commits before that date or treat them as unstructured.

Allow chore and refactor as escape hatches. Not every commit fits cleanly into a category. chore is the universal “this doesn’t affect users” bucket. Use it freely — it still contributes to the git log being scannable.

If you squash-merge, the pull request title is the commit. In that workflow the individual commits on a branch disappear, and the PR title becomes the one message that lands on main. Apply the convention there and stop worrying about the branch.

Common Objections (and the Responses)

“It’s too rigid. I don’t want to write imperative-mood commit messages all day.”

The rigidity is the point. Every time you think “is this a feat or a fix,” you’re spending two seconds thinking about what the change actually does. That’s cheap, and it prevents the accumulation of wip and stuff commits that make the log useless.

“Our team is too small to need this.”

Small teams benefit most, because small teams have less overhead to absorb chaos. A 2-person team with conventional commits can automate what a 10-person team with unstructured commits does manually.

“AI tools can already summarize unstructured commits.”

True, and they do a decent job. But structured commits let AI tools do a much better job. Giving an AI tool commits tagged feat vs chore means it knows which to surface and which to hide in the changelog. Without the tags, it has to guess.

“We already have a different convention.”

Fine. Conventional Commits isn’t sacred. Most of the benefit comes from any consistent convention, not specifically this one. If you have your own that works, keep it. The only requirement is that it’s machine-parseable.

Pairing Conventional Commits with Release Tooling

The convention is the input. These are the tools that read it:

  • Release Please opens a release pull request that computes the next version and updates CHANGELOG.md from your commits. You merge it when you’re ready.
  • semantic-release goes one step further and publishes on every qualifying push to the release branch, with no review step.
  • Changesets is the alternative when you’d rather write the changelog entry by hand at PR time. It doesn’t need conventional commits at all.
  • AI-powered changelog tools. Tools like ReleasePad’s GitHub integration read your conventional commits (or pull requests, which are often even richer) and draft user-facing release notes. The commit convention gives the AI structured signal about what to highlight.
  • Custom scripts. For teams with specific needs, a 50-line script can parse conventional commits and emit a markdown changelog, a JSON feed, or a Slack notification.

Whichever direction you go, the foundation is the same: a commit log that’s structured enough for automation. The side-by-side comparison is in how to automate release notes from GitHub commits.

What Conventional Commits Doesn’t Solve

Two specific limits worth naming.

It doesn’t improve commit content, only format. A commit titled feat: stuff is conventional but still useless. The convention enforces structure, not quality. Your team still has to care about clear descriptions — which is what the best-practices list above is for.

It doesn’t replace pull request context. A PR description with context, screenshots, and user-facing explanation is still more useful than a conventional commit. For teams using PRs seriously, the PR is often the better source for changelog generation. Conventional commits work best when commits and PRs are both well-written, not as a substitute for good PRs.

Where to Start

If your team doesn’t already use a commit convention:

  1. Agree on Conventional Commits (or a close variant) with the team.
  2. Install commitlint with the conventional config.
  3. Add a commit-msg hook or CI check.
  4. Put the types table in the repo.
  5. Start the convention from today forward.

That’s a one-afternoon project. The payoff compounds for every release, every changelog, every search through git history, every time you want to automate something downstream of commits.

Most teams that adopt this never go back. Not because the convention is beautiful — it’s a pretty minor discipline — but because the downstream automation is so much easier when the upstream data is structured.

The commit log is the most underused structured dataset in your product. Conventional Commits is the cheapest way to start treating it like one.


ReleasePad turns your conventional commits — or your raw, messy ones — into clean, user-facing release notes automatically. Connect your GitHub repo, get AI-generated changelogs, a hosted public changelog page, and an in-app widget. Try it free →


Further Reading

Frequently Asked Questions

What is Conventional Commits?

Conventional Commits is a lightweight specification for writing commit messages in a structured, parseable format. Each commit starts with a type (like feat, fix, perf, or chore), an optional scope, and a short description. The format turns your git log from unstructured text into machine-readable data that downstream tools can use to generate changelogs, decide version bumps, and automate releases.

What are the Conventional Commits types?

The specification itself defines two: feat for a new feature and fix for a bug fix. The other types most teams use come from the Angular convention and the commitlint conventional preset: docs, style, refactor, perf, test, build, ci, chore, and revert. The spec allows any additional type, so the list is a shared convention rather than a fixed rule.

What is the 50/72 rule for git commit messages?

It's a formatting convention: keep the subject line to about 50 characters and wrap the body at 72. The short subject stays readable in one-line log views and in tools that truncate it, and the 72-character wrap keeps the body legible in a standard 80-column terminal once git indents it. A blank line between the subject and the body is required for git to tell them apart.

What are the best practices for writing a git commit message?

Write a short subject in the imperative mood that says what the commit does, leave a blank line, then use the body to explain why the change was needed and anything a reviewer couldn't guess from the diff. Keep each commit to one logical change, reference the issue it relates to in a footer, and follow one consistent format across the team. Conventional Commits is the most widely used format because tools can parse it.

How do I enforce Conventional Commits on my team?

Install commitlint with the @commitlint/config-conventional preset, then add a Husky commit-msg hook or a CI check that rejects commits which don't match the convention. Setup takes about 15 minutes. After that, the tooling enforces the rules — no manual policing required.

Does Conventional Commits work with semantic versioning?

Yes — they're designed to pair. A fix commit implies a patch bump, a feat commit implies a minor bump, and a commit marked with ! or BREAKING CHANGE: implies a major bump. Tools like semantic-release and release-please use this mapping to compute the next version automatically from the commit history.

conventional-commits changelog git automation semantic-versioning developer-workflow

Ready to put this into practice?

Your changelog shouldn't be an afterthought.

ReleasePad makes it easy to publish great release notes — from a public changelog page to an in-app widget, GitHub integration, and analytics. Free to get started.

Get started — it's free
Try me now!