Commit Message Convention
This document outlines the commit message convention for the Rin project. Following these conventions allows us to automatically generate changelogs and release notes.
Format
Each commit message should follow this format:
Types
Scope
The scope is optional and should indicate the area of the codebase affected:
api- Backend API changesclient- Frontend/client changesdb- Database changesauth- Authentication relatedui- UI componentsdeps- Dependenciesconfig- Configuration filesdocs- Documentationrelease- Release related
Subject
- Use imperative mood ("add" not "added" or "adds")
- Don't capitalize the first letter
- No period at the end
- Maximum 50 characters
Good examples:
feat(auth): add password reset functionalityfix(api): handle null response from databasedocs(readme): update installation instructions
Bad examples:
feat: Added new feature(past tense, capitalized)fix: fixed the bug.(past tense, period at end)update stuff(no type, vague description)
Body
- Use imperative mood
- Wrap at 72 characters
- Explain what and why, not how
- Separate from subject with a blank line
Example:
Footer
- Reference issues and PRs:
Closes #123,Fixes #456 - Breaking changes:
BREAKING CHANGE: description
Example:
Examples
Feature
Bug Fix
Documentation
Breaking Change
Commit Message Linting
We recommend using commitlint to enforce these conventions:
Why?
- Automatic Changelogs: Release notes can be auto-generated
- Clear History: Easy to understand what changed and why
- Semantic Versioning: Helps determine version bumps (feat=minor, fix=patch, breaking=major)
- Better Collaboration: Consistent format makes reviews easier
Tools
-
Commitizen: Interactive commit message builder
-
VS Code Extension: "Conventional Commits" for autocompletion
Questions?
If you're unsure about the commit type or format, ask in your PR or refer to existing commits in the repository.