Kelly Mears

Conventional Commits

A lightweight convention giving commit messages a machine-readable type and scope.

Version Control & Delivery1 min read199 words10 out · 3 in
also calledCommit convention

Conventional Commits is a specification for commit message format: a type, an optional scope, and a description — fix(parser): handle empty input — with a body and footers below. Types in common use include feat, fix, docs, refactor, test, chore, and perf.

The convention buys two things. Messages become scannable, since the type and scope tell you what kind of change it is before you read anything. And they become machine-readable, so changelogs and version bumps can be derived automatically — a feat implies a minor bump, a breaking-change marker a major one. See Semantic Versioning.

The scope is where most of the value lives in practice, and where it is most often wasted. A precise scope naming the module or feature area makes history navigable; a vague one repeated across every commit adds nothing. Scopes should match how the project is actually organised, and should be reused rather than reinvented per commit.

The convention is orthogonal to how much a commit should contain — see Atomic Commit — and it does not remove the need for a body. A one-line conventional message is fine for a genuinely self-explanatory change; anything with a motivation worth recording still needs prose.

See also4

Hand-picked in the note itself — the neighbours worth reading next.

Related6

Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.

Linked from3

Notes elsewhere in the wiki that reach for this one.