What is Conventional Commits?
Why Interviewers Ask This
Mid-level Git & GitHub roles require deep understanding of this topic. Interviewers ask this to separate candidates who truly understand the mechanics from those who only know surface-level concepts.
Answer
Conventional Commits is a specification for adding human and machine-readable meaning to commit messages. It provides a structured format that enables automated changelog generation, semantic versioning, and better communication. Format: <type>[optional scope]: <description>\n[optional body]\n[optional footer]. Common types: feat — new feature (triggers minor version bump in semver); fix — bug fix (triggers patch bump); docs — documentation; style — formatting (no logic change); refactor — code restructure (no feature/fix); test — adding/updating tests; chore — build process, tooling; perf — performance improvement; ci — CI configuration. Breaking change: append ! after type (feat!:) or add BREAKING CHANGE: footer — triggers major version bump. Scope (optional): parentheses specifying what was changed: feat(auth): add OAuth login. Examples: feat(cart): add quantity adjustment; fix(api): handle null response from payment service; feat!: redesign authentication API. Tools: commitlint + husky enforce format; semantic-release automates versioning and changelog from commits.
Pro Tip
Back up your answer with a specific project or situation. Saying 'In my last Git & GitHub project, I used this when...' immediately makes your answer more credible and memorable.
Previous
What is git filter-branch and BFG Repo Cleaner?
Next
What is a monorepo and how does Git support it?