Skip to content

Conventional Commits

In one line

Conventional Commits is a specification for structured commit messages that enable automated changelogs and semantic versioning.

In simple words

Conventional Commits is a convention for writing commit messages in a structured format: type(scope): description. The type (feat, fix, docs, style, refactor, perf, test, chore) indicates the kind of change, an optional scope names the affected area, and the description is a short summary.

For example, "feat(auth): add OAuth login" adds a feature in the auth scope, while "fix(parser): handle empty input" is a bug fix. A footer with BREAKING CHANGE: or a ! after the type marks a breaking change. The body and footer provide detail.

The value is automation: tools can parse these messages to auto-generate changelogs, determine the next semantic version bump (feat → minor, fix → patch, BREAKING → major), and group changes by type. Projects like Angular, the semantic-release tool, and many libraries adopt this convention.

Example

bash
# Feature commit
feat(auth): add OAuth2 login flow

# Bug fix
fix(parser): handle empty input without crashing

# Breaking change (note the !)
feat(api)!: rename getUser to fetchUser

BREAKING CHANGE: getUser is now fetchUser

# Docs only
docs(readme): update installation steps

type(scope): description. feat→minor, fix→patch, ! or BREAKING CHANGE→major. Tools parse these to generate changelogs and version bumps.

Related terms

Related Resources

Related Lessons

Decode error messages

Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.

View errors

← Back to glossary