Conventional Commits bring clarity and consistency to your Git history.
With simple, structured prefixes, they make it easier to understand changes, automate versioning and changelogs, and improve team collaboration.
This guide offers a practical list of prefixes and what they mean — so your commits stay clear, meaningful, and easy to track.
✅ feat
Used when you’re adding a new feature.
Example: feat: add support for JWT-based authentication
🐛 fix
Used when you’re fixing a bug.
Example : fix: resolve NPE when saving a null customer entity
📚 docs
For documentation-only changes.
Example : docs: update README with Maven build instructions
🎨 style
Non-functional code changes — like formatting, imports, or renaming variables.
Example : style: organize imports
♻️ refactor
Code improvements that don’t fix bugs or add features.
Example : refactor: extract service logic into CustomerService
⚡ perf
Used for performance improvements.
Example : perf: enable Caffeine cache
🧪 test
Changes related to tests - adding new ones, fixing existing ones, etc.
Example : test: add unit tests
🛠️ build
Used for changes to the build system, dependencies, or tools like Maven.
Example : build: upgrade to Spring Boot 3.2 and Java 21
🤖 ci
Changes related to your CI/CD setup, like GitHub Actions or Jenkins pipelines.
Example : ci: update GitHub Actions to use setup-java with Corretto 21
🧹 chore
Routine maintenance, scripts, or config changes that don’t touch app logic.
Example : chore: update Checkstyle rules and regenerate project files
⏪ revert
Used when you need to undo a previous commit.
Example : revert: rollback "feat: enable email notifications"
💥 Breaking changes
You can flag a breaking change with an exclamation mark !
.
Example : refactor!: remove legacy payment processor integration
🎯 Tip
You can specify what part of the app your commit affects using a scope in parentheses :
Example : feat(auth): implement JWT authentication