Standardized commit message formats for clear, searchable Git history.
Use Conventional Commits for clear, searchable commit history.
type(scope): description
[optional body]
[optional footer(s)] Use these standardized types to categorize your changes:
New feature for the user
Bug fix for the user
Changes to documentation
Formatting, missing semicolons, etc.
Code change that neither fixes a bug nor adds a feature
Adding missing tests
Changes to build process or auxiliary tools
Performance improvements
# Feature commits
feat(auth): add OAuth2 Google authentication
feat(api): implement user profile endpoints
feat(ui): add dark mode toggle component
# Bug fixes
fix(auth): resolve token expiration handling
fix(api): correct validation error messages
fix(ui): fix responsive layout on mobile devices
# Documentation
docs(readme): update installation instructions
docs(api): add authentication endpoint examples
# Refactoring
refactor(auth): extract validation logic to separate module
refactor(api): simplify error handling middleware
# Breaking changes
feat(api)!: change user endpoint response format
BREAKING CHANGE: user endpoint now returns nested user object
# With scope and body
feat(dashboard): add user statistics widget
Add comprehensive user statistics including:
- Login frequency over time
- Feature usage analytics
- Performance metrics
Closes #123 # ❌ Too vague
fix: bug fix
update: changes
wip: stuff
# ❌ Too detailed for subject line
feat: add new user authentication system with OAuth2 Google integration and JWT token management plus password reset functionality
# ❌ Wrong type
feat: fix typo in documentation # Should be docs:
fix: add new feature # Should be feat:
# ❌ Poor grammar/formatting
Fix bug in the login system
added new feature
Update documentation
# ❌ Implementation details in subject
feat: change getUserData() function to return promise instead of callback Scopes provide additional context about which part of the codebase was affected:
# By component/module
feat(auth): add password reset functionality
fix(dashboard): correct chart data calculation
docs(api): update authentication endpoints
# By layer/area
feat(frontend): add loading spinners
fix(backend): resolve database connection timeout
test(integration): add user workflow tests
# By feature
feat(payments): integrate Stripe payment processing
fix(search): improve query performance
Mark breaking changes with ! and provide detailed explanation:
# Using ! notation
feat(api)!: change user response format
BREAKING CHANGE: The user endpoint now returns a nested user object
instead of a flat structure. Update client code to access user.profile.name
instead of user.name.
# Multiple breaking changes
refactor(auth)!: redesign authentication system
BREAKING CHANGES:
- Remove deprecated login() method, use authenticate() instead
- Change token format from JWT to custom format
- Require email verification before account activation