Documentation
Commit Types
The ten Conventional Commit types gitcomm can emit, when each one applies, and an example of each.
When your history already follows Conventional Commits, gitcomm reads that and matches it. The types below are the ones it can produce.
| Type | Use it for | Example |
|---|---|---|
feat | A new capability the user can see | feat(auth): add Google OAuth login |
fix | A bug fix | fix(cart): resolve quantity not updating on click |
refactor | Restructuring with no behaviour change | refactor(api): extract validation into middleware |
docs | Documentation only | docs: update API endpoint examples in README |
test | Adding or changing tests | test(auth): add unit tests for login flow |
chore | Maintenance, dependencies, tooling | chore(deps): update axios to v1.7 |
ci | Pipeline changes such as GitHub Actions | ci: add Node 22 to test matrix |
style | Formatting with no logic change | style: apply prettier formatting to utils/ |
perf | A measurable speed or memory gain | perf(query): add database index for user lookup |
build | Build system or external dependencies | build: switch bundler from webpack to vite |
Anatomy of a conventional commit
feat(auth): add two-factor authentication
│ │ │
│ │ └─ subject: what changed, lowercase, no trailing period
│ └───────── scope (optional): the area of the project affected
└────────────── type: the category of changeThe scope is optional and comes from the files in your diff. When gitcomm recognises an auth directory it will offer auth as the scope without being told.
How the style is detected
gitcomm reads your recent commit subjects and checks whether they follow the pattern. If most of them do, suggestions follow it. If your history is plain sentences, suggestions are plain sentences.
Detection also picks up subject length, capitalisation, trailing punctuation, and emoji use, so a repository that writes short lowercase subjects keeps getting them.
To override detection in either direction:
# Force Conventional Commits even in a plain-history repo
npx gitcomm --force-conventional
# Force a specific type and scope
npx gitcomm -t fix -s cart