How do I write conventional commit messages that follow team standards?▼
Conventional commits use a structured format: type(scope): description. The type (feat, fix, docs, style, refactor, perf, test, build, ci, chore) indicates the change category, scope is optional, and the description uses present tense, lowercase, no period, maximum 50 characters. This standardizes commit history across repositories and improves code review readability.
What's the correct format for a conventional commit message?▼
Follow type(scope): description with these rules: use present tense, keep the subject line lowercase, omit the period at the end, limit to 50 characters, and add an optional body explaining rationale. Include issue references when applicable. Types include feat, fix, docs, style, refactor, perf, test, build, ci, and chore.
When should I use conventional commit formatting in my workflow?▼
Use conventional commits whenever you need standardized, traceable commit history—especially for features, bug fixes, documentation updates, styling changes, performance improvements, tests, builds, and dependency updates. This practice saves time during code reviews and maintains consistency across team development workflows.
Can conventional commits help with repository-specific guidelines?▼
Yes. Conventional commit tools can align messages with team-specific conventions and standards, ensuring your commits match repository guidelines. This coordination reduces friction during reviews and maintains a cohesive commit history across the project.
What types of changes do conventional commits cover?▼
Conventional commits classify changes into types: feat (new features), fix (bug fixes), docs (documentation), style (formatting), refactor (code restructuring), perf (performance), test (test additions), build (build system), ci (CI configuration), and chore (maintenance). Each type clarifies the nature of your change in the commit history.
Do I need to write a commit body, or is the subject line enough?▼
The subject line follows strict rules and is required; the body is optional. Include a body to explain the rationale behind your change, especially for complex fixes or feature additions. Both together create a commit ready for immediate use and code review.