Software

What Are Conventional Commits? Commit Message Standard, Types and Changelogs

Talha Aslan 18 min read

Short answer

What are conventional commits?

Conventional Commits is an open specification for writing commit messages in the form type(scope): description. It gives every message a structure humans and tools can read. As a result, you see at a glance which commit adds a feature, which fixes a bug and which breaks compatibility, and tools derive versions and changelogs from it.

Keep reading for the full details and examples

At Talha Aslan and team, we use the standard on web projects for a simple reason: six months later, someone always asks why a change happened. This guide sticks to the official specification. We cover the commit types, breaking changes, the mapping to Semantic Versioning, automated changelogs and a practical rollout plan. If your Git basics feel rusty, start with our guide to essential Git commands.

What does a conventional commit message look like?

The official Conventional Commits 1.0.0 specification splits a message into three layers. Only the first line is mandatory. The body and the footers are optional, and you separate each layer with one blank line.

  • Header: a type, an optional scope in parentheses, a colon, one space and a short description. For example, fix(cart): discount code applied twice.
  • Body: the reason and the context for the change. It is free text, so it can run several paragraphs.
  • Footers: structured extras such as a breaking change note or a ticket reference.

The spec treats types, scopes and footer tokens as case insensitive. There is one exception, though: the breaking change token must appear in uppercase as BREAKING CHANGE. Also, footer tokens use a hyphen instead of spaces, so you write something like Reviewed-by.

At first glance this looks like extra ceremony. In practice, the header is the line you already write. The standard then simply adds a small label in front of it. In short, the habit change is small and the payoff is large.

Which conventional commits types exist and what do they mean?

The spec only defines two types as mandatory: feat and fix. It allows other types and points to the commitlint configuration based on the Angular convention as an example list. The table below summarizes those types and their effect on the version number.

TypeWhen to use itSemVer effectExample header
featYou add a new capability for usersMINORfeat(form): add file upload field
fixYou correct a bugPATCHfix(nav): mobile menu stays open
docsOnly documentation changesNonedocs: update setup steps
styleFormatting or whitespace, same behaviorNonestyle: fix indentation
refactorYou restructure code without changing behaviorNonerefactor(api): split client class
perfYou improve performanceNoneperf(images): precompute thumbnails
testYou add or correct testsNonetest: cover checkout flow
buildBuild system or dependency changesNonebuild: bump package version
ciContinuous integration configurationNoneci: cache dependencies in test job
choreMaintenance that touches neither code nor testsNonechore: remove old script
Any type plus !A backward incompatible changeMAJORfeat(api)!: rename response field

The rows marked "None" do not change the version on their own, according to the spec. However, any of them can still carry a breaking change. We cover that case in its own section below.

Why are feat and fix different from the other types?

Specifically, the spec uses "MUST" language for these two. A commit that adds a feature must use feat. A commit that fixes a bug must use fix. That rule matters because release tools compute version numbers by looking at exactly these two labels.

The most common confusion is the line between a feature and a fix. For example, if a form should have validated an email address and did not, adding that validation is a fix. On the other hand, if you add an upload field the form never had, that is a feat. In other words, the test is what users could reasonably expect before your change.

Another subtle point: do not label invisible internal work as feat. Otherwise your changelog fills its "Features" section with lines that mean nothing to a reader. For that kind of work, refactor, perf or chore is the honest label.

How do you mark a BREAKING CHANGE in conventional commits?

Put simply, a breaking change is any change that forces existing users to update their code or integration. The spec gives you two ways to flag it, and both carry the same meaning.

  1. Exclamation mark: put ! right after the type or scope, before the colon. For example, feat(api)!: user endpoint returns a new payload shape.
  2. Footer: after the body, add the BREAKING CHANGE token, a colon and a description. The spec also accepts BREAKING-CHANGE as a synonym.
  3. Both together: use the exclamation mark in the header and explain the migration in the footer. With the exclamation mark, the footer becomes optional and the description should explain the break.

A breaking change can appear in any type. For instance, a refactor that renames a public function and removes the old name also breaks callers. Therefore, you add the exclamation mark based on impact, not on the type list.

Also, writing only "API changed" in the footer does not help anyone. Tell readers what to do instead, such as which field replaces the old one. In the changelog, this line is the first thing the person doing the upgrade reads.

How do conventional commits map to Semantic Versioning?

The spec defines itself as a companion to Semantic Versioning. In SemVer, a version reads MAJOR.MINOR.PATCH. Incompatible API changes bump MAJOR, backward compatible features bump MINOR, and backward compatible bug fixes bump PATCH. For a deeper walkthrough of reading version numbers, see our article what semantic versioning is and how to read it.

In practice, the mapping works like this: fix means PATCH, feat means MINOR, and any commit with a breaking change means MAJOR. So a tool that reads the commits between two releases can compute the next number by itself. For example, if a range only contains fixes, 1.4.2 becomes 1.4.3. A single feat turns it into 1.5.0, and a single breaking change turns it into 2.0.0.

SemVer treats versions starting with zero (0.y.z) as initial development, where the public API should not count as stable. The Conventional Commits FAQ adds practical advice for that phase: act as if you had already released the product. After all, someone else, even a teammate, may already depend on your code.

How should you choose a scope?

A scope is the noun in parentheses that tells readers which part of the codebase a change touches. The spec only requires it to be a noun and leaves the list to you. Consequently, scope choice is a team decision.

In practice, a good scope list is short, stable and unambiguous. On a business website, for instance, nav, form, blog, checkout and admin usually cover everything. Also, avoid using file names as scopes, because the history loses meaning once files move.

  • Keep each scope to one word. If a change touches checkout and cart, consider splitting the commit.
  • Write the list down in the contributing guide, so new teammates do not have to guess.
  • For changes that affect the whole project, leaving the scope empty beats inventing a vague "general" scope.
  • In monorepos, package names make good scopes and let you split changelogs per package.

How do you write a good conventional commits description?

The description is the sentence readers see in the changelog. So treat it like a short news line for someone who uses the product, not like a private note. Descriptions such as "fix", "update" or "wip" carry no information once they land in a release note.

We therefore use three questions. What changed? Who does it affect? What was the old behavior? For example, fix(form): phone field rejected numbers with spaces answers all three. By contrast, fix: form bug answers none of them.

  • Keep the line short and move detail into the body.
  • Use one commit per topic and split unrelated fixes.
  • Pick one language for the repository and stay consistent.
  • Put ticket numbers in a footer, not in the description.

The spec sets no character limit for the description. Your team sets that limit in a linter such as commitlint. Check the current default value in the tool's own documentation.

What belongs in the body and the footers?

First, the body explains what the code cannot: why. The diff already shows what changed. However, only you know which customer complaint, which measurement or which constraint led to the decision. Half a year later, the person hunting a bug will most likely be you.

For example, if you shortened a cache lifetime, writing "price changes on the campaign page reached visitors too late" leaves an important warning for whoever wants to lengthen it again. Likewise, one sentence about an approach you tried and dropped stops the next person from repeating it.

Footers, on the other hand, hold structured data. The spec suggests a format inspired by the git trailer convention: a token, a colon and a value, or a token, a space, a hash sign and a number. Breaking change notes, ticket references, co-author lines and the hashes of reverted commits all belong here. That way, tools can separate these lines from the free text of the body.

How do you generate a changelog from conventional commits?

An automated changelog comes from a tool that reads every commit since the last tag and groups them by type. It places feat lines under "Features" and fix lines under "Bug Fixes". Breaking changes move to their own section at the top. Then the tool calculates the version number, creates the tag and, if you want, updates the changelog file.

The open source ecosystem offers several families of tools for this: commit linters, changelog generators and end to end release tools. We do not crown any tool as the best one here. The specification's own website also links to compatible tooling. When you choose, your language, package manager and release channel matter most.

In practice, a typical flow looks like this:

  1. A developer writes a commit, and a commit hook or a CI step checks the message format.
  2. After a merge to the main branch, the release tool scans commits since the last tag.
  3. The tool reads the types and decides on the next version number.
  4. It writes a new changelog section and creates the tag.
  5. Optionally, it triggers publishing to a package registry or a deployment.

Above all, the tool is only as smart as the input it reads. A commit with the wrong label produces the wrong version number. That is why you should never skip the validation step.

How do you roll out conventional commits in a team?

However, a standard that arrives overnight as a hard rule meets resistance. In our experience, the smoothest rollout shows the value first and adds automation second. We suggest this order.

  1. Write down types and scopes. Add them to the contributing guide as a table and have the discussion once.
  2. Use it voluntarily for a week. Start writing new commits in the format without blocking anyone.
  3. Add local validation. A commit message hook rejects a bad message on the spot and explains why.
  4. Validate pull request titles too. If you squash merge, the title is what really counts.
  5. Run the release tool on a test branch. Read the generated notes; seeing meaningless lines improves descriptions faster than any rule.
  6. Connect it to the main branch. In the final step, tagging and changelog updates run automatically.

Testing releases that affect a live website in a separate environment first also belongs to this flow. We explain that setup in our guide on what a staging site is and how to update without breaking production.

What does a realistic release cycle look like?

As an example scenario, picture the website of a service business. The last tag is 1.4.2. Over two weeks, these commits reach the main branch:

  • fix(form): phone field rejected numbers with spaces
  • docs: add admin panel usage notes
  • feat(blog): show reading time on posts
  • perf(images): serve smaller cover images
  • fix(nav): mobile submenu did not close

Next, the release tool sees one feat and no breaking change in this range. Therefore, the new version becomes 1.5.0. The changelog lists reading time under "Features" and the form and navigation lines under "Bug Fixes". Depending on configuration, the docs and perf lines either stay hidden or appear in their own section.

Then change the scenario. In the same range, the contact form endpoint renames a response field, and an external integration reads that field. The developer writes feat(form)!: response field uses a new name and adds migration steps in the footer. This time the tool produces 2.0.0. The person who maintains the integration sees exactly what to do at the top of the release notes.

How do squash, rebase and merge work with conventional commits?

Specifically, your merge strategy decides which messages reach the release tool. With a squash merge, every commit on the branch collapses into one, and the pull request title usually becomes its header. In that case, intermediate commits matter less, while the title matters a lot. The spec's FAQ also notes that maintainers can clean up messages during a squash.

If you rebase to keep a linear history, each commit lands on the main branch as it is. So each one needs a correct label. We compare the two strategies in our article on git rebase vs merge and when to use which.

Also, many release tools skip merge commits by default. Still, confirm your tool's behavior in its documentation. If a merge runs into conflicts, our guide on how to resolve git merge conflicts shows how to move forward without breaking your message format.

What are the most common conventional commits mistakes?

We keep seeing the same mistakes in repositories that adopt the standard. Most look small, but they still directly distort the changelog and the version number.

  • Calling everything feat: the MINOR version climbs for no reason, and the changelog bloats.
  • Forgetting to flag a breaking change: the most expensive mistake, since users expect a safe update and their integration fails.
  • Mixing two topics in one commit: whichever type you pick, the label tells half the story.
  • Skipping the space after the colon: the spec requires a colon and a space, and some parsers reject the line otherwise.
  • Growing the scope list every week: fifteen scopes produce a dictionary nobody remembers.
  • Putting secrets in messages: passwords, keys or customer data stay in commit history permanently.

The last point also applies to files. If an environment file slipped into the repository, our guide on what to do when an .env file was accidentally committed to Git walks through the cleanup.

What if you picked the wrong type or need to revert?

The spec's FAQ gives clear advice for a commit with the wrong type: before you merge or release, use an interactive rebase to edit the history. After release, things change. Rewriting shared history breaks your teammates' copies, so it is safer to explain the correction in the next release notes.

Using a type outside the spec is not a disaster. However, tools built on the spec will simply miss that commit. In other words, the change drops out of the changelog and does not affect the version.

Likewise, for reverts the spec sets no strict rule and leaves the decision to tooling. Its suggestion is a revert type with a footer that lists the reverted commit hashes. If a rebase seems to have swallowed a commit, do not panic, because you can usually still recover it. We cover that in our guide to detached HEAD and recovering lost commits.

How do commit message linters work?

Put simply, a linter is a small check that compares the message with the format. Locally, it runs as a commit hook. The moment a developer commits, it reads the message and stops the commit if it does not match. Then it prints which rule failed, such as an unknown type or a missing space after the colon.

A local hook alone is not enough, because developers can skip it or never install it. Therefore, we recommend running the same check in CI whenever someone opens a pull request. That way, the rule lives with the repository instead of on someone's laptop.

Next, your team sets the rules: allowed types, the scope list, header length and casing. That said, do not make them stricter than necessary. For example, requiring a scope on every commit pushes people to invent scopes for project wide changes. We usually start by enforcing type and format and leave scopes as a recommendation.

One more caveat: a linter checks format, not meaning. fix: fix passes the check and says nothing. So reading the message during code review still matters; automation complements it rather than replacing it.

Who are you writing the changelog for?

After all, an automated changelog is a list of commit descriptions. Consequently, its quality depends on who you picture while writing them. In a library, the reader is usually another developer who needs to know which function changed and what to update. On a website, the reader is often a project manager or the business owner.

For the business owner, "fix(form): phone field rejected numbers with spaces" is meaningful, because it relates to lost leads. By contrast, "refactor(api): split client class" tells them nothing. That is why many teams configure the release tool to show only feat, fix and breaking changes, and to hide other types in a technical section.

If you have two audiences, you can produce two outputs: a full changelog for developers and a short summary for clients. Both come from the same source, so one well written description does two jobs. Put simply, pause for a second and ask whether someone outside the team would understand the line.

Do conventional commits make sense for every project?

No, not for every project. A small script that one person maintains, with no version numbers and no dependents, may gain little from the extra structure. On the other hand, the value shows up quickly in any of these situations:

  • More than one person commits to the same repository.
  • Other projects depend on your package or API.
  • You deliver regular release notes to a client or manager.
  • Deploy and rollback decisions depend on reading history.
  • You accept contributions to an open source project.

Also, many open source projects ask for this format in their contributing guide. If you are preparing a first contribution, our beginner guide to contributing to open source covers the process end to end. In multi repository setups with submodules, each sub repository has its own release flow; our article on what a git submodule is and how to use it explains how that fits together.

How small should a conventional commit be?

In short, the right size fits one type and one description. If you struggle to pick a type, the commit probably contains more than one job. For example, a change that fixes a menu bug and adds a new footer link is really one fix and one feat.

Small commits pay off in three ways. First, they are easy to revert without touching anything else. Second, reviews go faster because the reviewer focuses on one topic. Finally, the changelog stays accurate, since each line describes one change.

That said, avoid the opposite extreme. Shipping every half finished step of a feature as a separate feat lists the same feature five times. A good balance is to commit as often as you like on the branch, then squash into one meaningful header when you merge. Git's interactive staging also lets you pick hunks from the same file, so you can separate two topics before you commit.

Conventional commits quick checklist

Before you push, then, run through these points. We kept the list short because it applies to every commit.

  • Is the type right: a new user capability, a bug fix or internal work?
  • Is the scope on the team's list?
  • Did you leave one space after the colon?
  • Does the description make sense when someone reads it in a changelog?
  • If the change breaks compatibility, did you add the exclamation mark or a footer?
  • Does the body explain why?
  • Is the message free of secrets?

Additionally, Git lets you define a commit message template. Add the type list and these reminders as comments, and they appear every time your editor opens. For new teammates, that small setting works better than a long training session. Once these seven points become a habit, automated changelogs stop being extra work and simply produce the right result.

Frequently Asked Questions

Are conventional commits a built-in Git rule?
No, Git itself does not enforce any message format. Conventional Commits is an open specification that teams adopt voluntarily. If you want to enforce it, you add a linter in a commit message hook or in your CI pipeline. That way, a message that does not match the format never reaches the repository, and the developer sees the reason right away.
Do types other than feat and fix change the version number?
No, according to the spec, types such as docs, style, refactor, perf, test, build, ci and chore do not change the version on their own. However, if any of them carries a breaking change flagged with an exclamation mark or a BREAKING CHANGE footer, the release tool bumps MAJOR. Some tools let you configure perf to bump PATCH, so check your tool's documentation.
Can I write commit descriptions in a language other than English?
Yes, the description, body and scope can use any language. The type keywords such as feat and fix should stay in their standard form so tools recognize them. What matters most is consistency within one repository. If clients read your release notes, writing descriptions in their language makes the notes usable without extra editing.
Should I use the exclamation mark or the footer for breaking changes?
Both are valid in the spec and mean the same thing. The exclamation mark makes the break visible in the header itself. The footer lets you write detailed migration instructions that guide readers step by step. In practice, using both gives the clearest result: the mark in the header and the upgrade steps in the footer.
If I squash merge, does every commit need to follow the format?
Usually not, because a squash merge turns the branch into a single commit and the release tool reads only that one. In that case, the pull request title becomes the critical line. The spec's FAQ also notes that maintainers can clean up messages during a squash. Adding a check that validates pull request titles is the safest approach.
Are conventional commits useful for a small website project?
They help if more than one person works on the site or if you send regular change reports to a client. Finding which fix went live on which date becomes much easier. For a tiny site that one person manages without version numbers, the structure may add overhead, and clear descriptive messages alone can be enough.
  • conventional commits
  • commit messages
  • git
  • semantic versioning
  • changelog
  • release automation
  • developer workflow
Share:
Talha Aslan

Google Partner digital marketing expert. Hands-on with SEO, Google Ads, web design and e-commerce projects since 2012; every post here comes from that experience.

Next project

Get a quote for your project.

Your brief goes straight to Talha Aslan and team: strategy led by Talha, delivery by an experienced team. We reply the same day and send the scope, timeline and price as a written quote within 1 business day.