BeansPath follows the Conventional Commits specification for clear, structured commit messages.
<type>(<scope>): <subject>
[optional body]
[optional footer]
| Type | Description | Example Use Case |
|---|---|---|
feat |
New feature | Adding Google OAuth, new dashboard widget |
fix |
Bug fix | Fixing map rendering, correcting calculation |
docs |
Documentation only | README updates, code comments |
style |
Formatting changes | Prettier auto-format, import organization |
refactor |
Code restructuring without behavior change | Extract component, rename variable |
perf |
Performance improvement | Optimize rendering, reduce bundle size |
test |
Adding or updating tests | Adding unit tests, fixing broken tests |
build |
Build system or external dependencies | Update webpack, add npm package |
ci |
CI/CD changes | GitHub Actions workflow, Docker config |
chore |
Maintenance tasks | Update dependencies, configure linters |
revert |
Reverting previous commit | Revert "feat: add feature X" |
Optional but recommended. Indicates which part of codebase is affected:
auth- Authentication relatedmap- Map componentapi- API callsdb- Databaseui- User interfacedocs- Documentationdeps- Dependencies
- Use imperative mood: "add" not "added" or "adds"
- Don't capitalize first letter
- No period at the end
- Keep under 50 characters
- Explain what and why, not how
- Wrap at 72 characters
- Separate from subject with blank line
- Reference issues:
Closes #123,Fixes #456,Refs #789 - Note breaking changes:
BREAKING CHANGE: description
feat(auth): add Google OAuth integration
fix(map): resolve polygon area calculation error
Fixed issue where complex polygons with self-intersecting edges
returned negative area values. Updated calculation to use absolute
value and validate polygon before processing.
Fixes #456
refactor(api)!: change API response format
Updated all API endpoints to return data in standardized envelope
format with metadata and pagination info.
BREAKING CHANGE: API responses now use { data, meta } structure
instead of direct array return. Update all API consumers.
Refs #789
feat(dashboard): add batch analytics widget
Implemented new widget showing batch statistics with charts
for quality scores, volume trends, and processing methods.
Closes #123, #124
Refs #125
- Write commit messages for others: Reviewers and future developers
- Be specific: "fix login bug" → "fix(auth): prevent session timeout during OAuth flow"
- Group related changes: Don't mix features and fixes in one commit
- Test before committing: Ensure code passes all checks
- Reference issues: Link commits to issue tracker
Our pre-commit hook automatically:
- Validates commit message format
- Runs type checking
- Runs linting
- Runs tests (if applicable)
To bypass (use sparingly):
git commit --no-verify -m "Emergency fix"# Amend last commit message
git commit --amend
# Interactive rebase to edit history
git rebase -i HEAD~3
# View commit history
git log --oneline --graph❌ Fixed stuff
❌ WIP
❌ asdfasdf
❌ Updated files
❌ commit
❌ final commit
❌ final commit (for real this time)
✅ feat(dashboard): add real-time batch tracking
✅ fix(map): correct coordinate transformation for southern hemisphere
✅ docs(readme): update installation instructions for Docker
✅ perf(charts): implement virtualization for large datasets
✅ test(auth): add integration tests for OAuth flow
Remember: Good commit messages make code review easier, debugging faster, and release notes generation automatic!