Conventional Commits: Git Messages Your Team Will Thank You For

Open a Git log and read the messages. If they say “fix stuff”, “wip”, and “asdf”, the history is useless as documentation, and every code review starts with a guessing game. Conventional Commits fixes this with a small format that anyone can learn in ten minutes: a type, a scope, and a short description. The result is a history that reads like a changelog, which is exactly what it becomes.

Conventional Commits: git messages with a format

The format is one line: type, optional scope in parentheses, colon, space, description. “feat(auth): add password reset flow” tells a reader what changed, where, and in what direction, without opening the diff. “fix(api): return 404 for missing orders” does the same for a bug fix. The type is a short verb from a fixed list: feat for a new feature, fix for a bug fix, docs for documentation, style for formatting, refactor for code changes that alter neither behaviour nor a fix, test for test changes, and chore for everything else. The scope names the part of the codebase, and the description is written in the imperative, as a command: add, fix, remove, not added, fixed, removed. Conventional commits git messages stay short on purpose, because the line is a headline, not the whole story.

feat(auth): add password reset flow
fix(api): return 404 for missing orders
docs(readme): document the new env vars

Type scope and description

Type scope and description each earn their place. The type lets tools and humans sort commits by intent: a release script can tell features from fixes, and a reviewer can tell at a glance whether a pull request adds behaviour or only moves code. The scope narrows the change to one area, which helps when a repository has several packages or services. The description says what the commit does, in plain words, starting with a verb. Keep it under about 70 characters so it reads well in a log. If the change needs more explanation, put it in the commit body, a paragraph below the first line, not in the headline. A body that says why the change was needed is worth more than a longer headline.

Breaking changes marked clearly

Breaking changes marked clearly are the part of the format that prevents real damage. A commit that changes an API response, removes a config option, or renames a function should carry a footer that says so: “BREAKING CHANGE: the /orders endpoint no longer returns the legacy total field”. Some teams also add an exclamation mark after the type, “feat(api)!: …”, to flag it in the headline. Either way, the signal is machine-readable, so a release tool can bump the major version automatically instead of relying on someone remembering. If your team has ever shipped a breaking change in a patch release, this one habit is the fix.

Changelogs from commit history

Changelogs from commit history are the payoff. Because every commit declares its type and scope, a tool can group them into a release note automatically: features under one heading, fixes under another, breaking changes called out at the top. You no longer write the changelog by hand the night before a release, and you no longer forget what went into a version. The changelog is only as good as the messages, though. A release note built from “fix stuff” commits is still useless, which is why the format has to be a team habit, not one person’s hobby. Enforce it lightly at first: a linter that warns on bad messages, and a reviewer who asks for a better message instead of merging anyway.

Messages your team reads

Messages your team reads are short, specific, and honest about scope. Compare “update code” with “refactor(auth): extract token validation into a helper”. The first could mean anything. The second tells a reviewer exactly where to look and what to expect. Write the message for the person who will read it in six months, probably you, trying to work out why a line changed. Mention the ticket or issue number in the footer when one exists, so the history links back to the discussion. And keep each commit to one logical change: a commit that adds a feature and fixes an unrelated bug in the same diff needs two messages, which means it needs two commits.

Getting a team to adopt it

Adoption works best as a small, visible change. Start with one repository and a short guide in the readme: the types, one example of each, and the rule for breaking changes. Add a commit message linter to the project so mistakes get caught before review, and let the changelog tool show the benefit at the next release. Do not rewrite old history to fit the format; start from today and let the log improve gradually. Teams that try to convert everything at once give up. Teams that start with new commits keep going, because the next release note writes itself. The same discipline pays off in the pipeline: a CI pipeline built with GitHub Actions can read commit types to decide what to build and what to release. And when the messages make reviews faster, it helps to pair them with a good review habit, which is why writing tests that catch bugs, not just coverage matters alongside them: clear messages plus clear tests make a pull request easy to trust. When you choose where the repository lives, comparing Git hosting in 2026 covers the commit message and merge settings each platform supports.

Conventional Commits is not a process. It is a sentence structure. Adopt it, and the Git log turns from a pile of guesses into the first page of documentation for every change your team ships.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.