Conventional Commits
Also Known As
Conventional Commits spec
commit convention
feat fix chore
TL;DR
A commit message specification — type(scope): description — enabling automated changelogs, semantic versioning, and machine-readable history.
Explanation
Conventional Commits defines a structured format: <type>[optional scope]: <description>. Types: feat (new feature → bumps MINOR), fix (bug fix → bumps PATCH), docs, style, refactor, test, chore, perf. Breaking changes are indicated by a ! suffix or BREAKING CHANGE: footer (→ bumps MAJOR). Example: feat(auth): add OAuth2 login via GitHub. Tools built on this format: semantic-release (automated npm/GitHub releases), git-cliff and conventional-changelog (CHANGELOG generation), and commitlint (pre-commit enforcement). For PHP projects, use cocur/slug-based tooling or the standard semantic-release with a PHP adapter. Pair with a pre-commit hook (Husky or a PHP git hook library) to enforce the format.
Common Misconception
✗ Conventional Commits is just a style preference with no functional benefit. Tools like semantic-release and standard-version parse commit types to automatically determine version bumps (feat → minor, fix → patch, BREAKING CHANGE → major) and generate changelogs — the convention drives automation.
Why It Matters
Conventional commits give commit messages a standard format (feat:, fix:, breaking change:) enabling automated changelog generation, semantic version bumping, and clear history filtering.
Common Mistakes
- Inconsistent type prefixes across the team — some use 'feature:', others 'feat:', others nothing.
- Vague commit bodies: 'fix: bug' — the body should explain what was broken and how it was fixed.
- Not using BREAKING CHANGE footer for breaking API changes — automated tooling cannot detect them.
- Over-strict enforcement driving developers to make huge commits to avoid multiple messages.
Code Examples
✗ Vulnerable
# Non-conventional commits — no structure:
git log:
'fixed stuff'
'wip'
'FINAL'
'changes'
'more changes'
# Conventional commits:
'feat(auth): add OAuth2 Google login'
'fix(session): regenerate ID after privilege change'
'docs: add deployment runbook'
'feat!: rename user_name to username (BREAKING CHANGE)'
✓ Fixed
# Format: <type>(<scope>): <short description>
git commit -m 'feat(auth): add OAuth2 login via GitHub'
git commit -m 'fix(cart): prevent duplicate line items on concurrent add'
git commit -m 'refactor(payment): extract StripeGateway to adapter class'
git commit -m 'perf(query): add covering index on orders.user_id'
git commit -m 'docs(api): document /orders endpoint rate limits'
git commit -m 'test(checkout): add integration test for card decline flow'
git commit -m 'chore(deps): bump phpunit to 11.1'
# BREAKING CHANGE — add ! and footer:
git commit -m 'feat(api)!: rename /users to /members
BREAKING CHANGE: clients must update all /users references to /members'
Tags
🤝 Adopt this term
£79/year · your link shown here
Added
15 Mar 2026
Edited
22 Mar 2026
Views
26
🤖 AI Guestbook educational data only
|
|
Last 30 days
Agents 0
No pings yet today
No pings yesterday
Perplexity 9
Amazonbot 8
Google 2
Ahrefs 2
Unknown AI 2
Also referenced
How they use it
crawler 21
crawler_json 1
pre-tracking 1
⚡
DEV INTEL
Tools & Severity
🟢 Low
⚙ Fix effort: Low
⚡ Quick Fix
Use the format: type(scope): description — feat, fix, docs, refactor, test, chore — and automate changelog generation and version bumps from commit history
📦 Applies To
any
any
🔍 Detection Hints
Commit messages like 'fix stuff' 'WIP' 'misc changes' with no type or scope structure
Auto-detectable:
✓ Yes
commitlint
semantic-release
conventional-changelog
⚠ Related Problems
🤖 AI Agent
Confidence: Medium
False Positives: Medium
✗ Manual fix
Fix: Low
Context: File