All tools
development
Conventional Commits cheatsheet
Reference the Conventional Commits format, types, rules, and examples.
Structure
Start with the type and description. Add body and footer blocks only when they help.
<type>[optional scope]: <description> [optional body] [optional footer(s)]
Types
Use the first word to say what kind of change the commit contains.
- feat
- A new feature for the user
- fix
- A bug fix for the user
- docs
- Documentation changes
- style
- Code style changes such as formatting or missing semicolons
- refactor
- Code changes that neither fix a bug nor add a feature
- test
- Adding or updating tests
- chore
- Maintenance tasks, dependency updates, or build changes
- perf
- Performance improvements
- ci
- Changes to CI/CD configuration
- build
- Changes to the build system or external dependencies
- revert
- Reverting a previous commit
Description
- Use imperative mood, such as "add" instead of "added" or "adds".
- Keep it concise. 50 characters or less is a useful target.
- Do not capitalize the first letter.
- Do not end with a period.
Body
- Separate the body from the description with one blank line.
- Explain the motivation and contrast with previous behavior.
- Use imperative mood.
Footer
- Breaking changes start with BREAKING CHANGE:.
- Issue references use forms such as Closes #123 or Fixes #456.
- Co-authors use Co-authored-by: Name <email>.
Scopes
Put the affected area in parentheses when it adds useful context.
feat(auth): add OAuth2 integration
fix(api): resolve timeout issues
docs(readme): update installation instructions
Examples
Copy a pattern and replace the words with the change you made.
Simple commit
feat: add user authentication
With scope
fix(parser): handle edge case in JSON parsing
With body
feat: add email notifications Users can now receive email notifications for important events. This includes account changes, security alerts, and system updates.
With footer
fix: prevent racing of requests Introduce a request id and a reference to latest request. Dismiss incoming responses other than from latest request. Closes #123
Breaking change
feat!: send an email to the customer when a product is shipped BREAKING CHANGE: The shipping service now requires an email address
Full example
feat(shopping cart): add ability to remove items Users can now remove items from their shopping cart by clicking the remove button next to each item. This improves the user experience by allowing corrections without starting over. Closes #456 Co-authored-by: Jane Doe <jane@example.com>