Skip to main content
Guide 5 min read

How to Write Conventional Commits That Your Team Will Actually Follow

Open your Git log and read the last twenty messages. If you see “fix stuff,” “update” and “wip” over and over, you’re not alone. Most teams start there. Conventional commits fix that mess with one simple pattern, but writing them is the easy part. Getting a whole team to follow them is the hard part.

This guide covers the format, the small set of types worth using, how to write subjects that people can scan and how to roll the habit out without a revolt. You’ll also get a pattern you can paste into a tester to check messages today.

What conventional commits actually are

Conventional Commits is a lightweight spec for commit messages. Every message starts with a type, then an optional scope, then a short description. Here’s a real one: feat(auth): add password reset email.

Why bother? Because structured messages power real tools. They build changelogs, decide the next version number and make Git history easy to search. A reviewer can scan a hundred commits and see in seconds which ones changed behavior and which ones touched only docs.

The spec ties into semantic versioning. A fix bumps the patch number, a feat bumps the minor number and a breaking change bumps the major number. That link is why the spec uses those words.

The parts of a commit message

A full message has up to three blocks, separated by blank lines.

  • Header. The type, an optional scope in parentheses, a colon and a short description.
  • Body. Optional. Explain why you made the change, since the diff already shows what changed.
  • Footer. Optional. Link issues, such as Refs: 123, or flag a breaking change.

The scope tells readers which part of the project changed, like api, cart or profile. Keep scope names short and agree on the list. Ten scopes work. Eighty don’t.

Pick a small set of types

The spec requires only feat and fix. Everyone else borrows a few common extras. Here’s a set most teams can live with:

  • feat adds something new for users.
  • fix repairs a bug.
  • docs changes documentation only.
  • refactor reshapes code without changing behavior.
  • test adds or fixes tests.
  • chore covers upkeep, such as dependency bumps.

Add perf, build and ci later if you need them. Every extra type is one more thing to remember, and memory is what kills adoption.

Write subjects people can scan

The description is the line everyone reads. Make it count.

  • Use the imperative mood. Write add, fix or remove, as if you’re giving the codebase an order. A handy test: the message should finish the sentence “If applied, this commit will…”
  • Keep the header near 50 characters and under 72. Our character counter counts them for you.
  • Skip the period at the end.
  • Start the description with a lowercase letter, and let your team agree on it. Our text case converter fixes casing in a click.
  • One commit, one idea. If you need the word and in the header, you probably need two commits.

Here’s a good one: fix(api): return 404 for missing users. And here’s a bad one: “fixed stuff and updated docs.” The bad one tells your future self nothing.

Mark breaking changes clearly

A breaking change forces users to change their code, so it deserves a loud signal. You have two ways to flag it. Add an exclamation mark before the colon, like feat(api)!: remove v1 endpoints. Or add a footer that starts with BREAKING CHANGE, followed by a colon and a plain explanation of what breaks and how to migrate.

Use both when the change is big. The mark helps people who scan, and the footer helps the person who must fix their code at 5 PM on a Friday.

Why teams ignore the rules (and what fixes it)

Here’s the honest truth. Teams rarely reject conventional commits because they hate structure. They reject them because the rules feel like homework. Three causes show up again and again.

  • Too many rules. Twelve types and forty scopes turn every commit into a quiz. Shrink the list.
  • No feedback. People learn the rule only when a review comment arrives a day later. Check messages the moment someone types them.
  • No payoff. If nothing uses the structure, it feels like busywork. Show the changelog or the automatic version bump, and people see the point.

The fix is simple: fewer rules, instant feedback and a visible reward.

Make the right thing the easy thing

Willpower fades. Tools don’t. Set up these layers, from friendliest to firmest:

  1. A commit template. Git can pre fill the editor with a short guide through its commit template setting. People see the format every time.
  2. A prompt tool. Commitizen asks a few questions and builds the message for you, and our Git commit formatter helps you shape a message right in your browser.
  3. A local check. Husky can run commitlint on every commit through the commit message hook, and it fails fast with a clear error.
  4. A CI check. People skip local hooks, so run the same check on pull requests. This is your safety net.
  5. A pull request title check. With squash and merge, the PR title becomes the commit on your main branch, so check that one title and ignore the mess inside.

Want a quick pattern to test? Try ^(feat|fix|docs|refactor|test|chore)(\(\w+\))?!?: .+$ in our regex tester against a few sample messages. It checks the type, the optional scope, the optional exclamation mark and a description.

A rollout plan that sticks

Don’t flip every switch on day one. Move in this order:

  1. Agree on the types and scopes in a thirty minute chat. Write them on one page.
  2. Add three good examples and three bad ones to your contributing guide.
  3. Add the commit template.
  4. Turn on the local check as a warning first, then make it strict after two weeks.
  5. Add the CI check.
  6. Turn on automatic changelogs with a release tool such as semantic release or release please.
  7. Review after a month. Remove any type nobody uses.

Apply the rules to new commits only. Don’t rewrite old history to make it pretty, because that’s a fight nobody needs. And lead by example in code reviews. A friendly note that says “try feat here” teaches more than any lint error. Drafting long bodies or pull request text? Our Markdown editor is handy for that.

Mistakes that make the rules fall apart

A few slips sink most rollouts.

  • Using chore as a junk drawer for everything that doesn’t fit.
  • Using feat for every change, which wrecks your version numbers.
  • Writing past tense messages like “added” or “fixed.”
  • Forgetting the breaking change footer.
  • Cramming three changes into one commit.
  • Making the rules strict on day one with no template, no examples and no help.

Rewrote a message a few times? Compare your drafts in our text diff checker and keep the clearest one.

The short version

Conventional commits give your history a shape: a type, an optional scope and a short description in the imperative mood. Keep the type list small, flag breaking changes clearly and give people instant feedback through templates, hooks and CI. Show the payoff with automatic changelogs, and apply the rules to new commits only.

Pick one repo this week. Write the one page of rules, add the template and see how the next ten commits look.

Free browser based tools on Black Claaw to format messages, count characters, test patterns and draft text.

View all tools

Advertisement