What are commit types?
The commit type is the first word of the message and tells you at a glance what kind of change it contains. It is the foundation of Conventional Commits:type(scope): description. With this format the history reads itself, changelogs can be generated automatically and tools can pick the next version followingSemVer.
The most common types
feat: a new feature for the user. Bumps the minor version.fix: a bug fix. Bumps the patch version.docs: documentation-only changes.style: formatting, whitespace or semicolons; no behavior change.refactor: restructures code without adding features or fixing bugs.perf: improves performance.test: adds or fixes tests.buildandci: changes to the build system, dependencies or continuous integration.chore: maintenance tasks that do not touch production code.revert: reverts a previous commit.
Breaking changes
Add ! after the type (feat!: remove API v1) or a BREAKING CHANGE: footer in the body. That signals a major version.
A good message
Use the imperative mood and lowercase (fix(ui): stop button jump on hover), keep the first line around 72 characters and explain the why in the body. To see every part of a message, read the anatomy of a commit.