Overview
A Conventional Commit reads type(scope)!: description, with an optional body and footers. Adopt it once releases are automated, because the prefix tells release tooling whether to cut a patch, minor, or major version. Enforce it with a commit hook such as commitlint, not review comments.
Rules
- The spec defines only
feat(MINOR) andfix(PATCH). Types such asdocs,refactor,perf,test,build,ci, andchoreare common conventions, not requirements. - A
!after the type or scope, or aBREAKING CHANGE:footer, means MAJOR regardless of type. - With squash merges the PR title becomes the commit message, so lint the title.
- Skip it for scratch repos and one-off scripts that publish no versioned releases.
feat(auth): add OAuth2 PKCE flow
fix(api): return 422 instead of 500 on invalid JSON
refactor(db)!: rename users.email to users.email_address
BREAKING CHANGE: clients must query email_address.
Related
- git: commit hygiene.
- atomic-commit: one logical change per commit.
- semantic-versioning: the bump the prefixes drive.
- git-commands: commands that produce and inspect commits.
- github-releases: release automation.