A curated list of awesome Git commit conventions, tools, resources, and best practices.
Common types of commits with their corresponding emojis:
- ✨ feat: New feature
- 🐛 fix: Bug fix
- 📚 docs: Documentation changes
- 💄 style: Code formatting
- ♻️ refactor: Code refactoring
- ⚡ perf: Performance improvements
- ✅ test: Adding/modifying tests
- 🔧 chore: Maintenance tasks
- 🔒 security: Security improvements
- 🌐 i18n: Internationalization and localization
- 📱 mobile: Mobile-specific changes
- 🎨 ui: User interface and design changes
- 📦 deps: Dependency updates
- 🚀 deploy: Deployment related changes
- 🔍 seo: Search Engine Optimization
- 🎯 ci: Continuous Integration configuration
- 📈 analytics: Analytics and tracking
- 🗃️ db: Database changes
- 🧪 experiment: Experimental features
- 🚧 wip: Work in progress
- 🔥 remove: Code removal
- 🚨 alert: Critical changes
- 🔈 logging: Logging improvements
- 🏗️ build: Build system changes
- 🔁 sync: Data synchronization
- 📊 metrics: Metrics and monitoring
- 🔌 api: API-related changes
The commit message should be structured as follows:
<emoji> <type>(<scope>): <subject> <body> <footer>
emoji
: A visual indicator of the commit typetype
: The category of the commit changescope
: The module/component being modified (optional)subject
: A brief description of the changebody
: Detailed explanation of the change (optional)footer
: Reference to issues, breaking changes, etc. (optional)
✨ feat(auth): add Google OAuth2 login - Implement OAuth2 client configuration - Add user profile mapping - Update session management Closes #123
🐛 fix(api): prevent payment processing race condition Added mutex lock to prevent double-charging during concurrent requests. Fixes #456
🔒 security(auth): implement rate limiting for login attempts - Add Redis-based rate limiting - Block IPs after 5 failed attempts - Send notification on suspicious activity Fixes CVE-2024-xxxx
- commitlint - Lint commit messages
- husky - Git hooks made easy
- commitizen - Interactive commit message CLI
- gitmoji-cli - Interactive emoji commit generator
- conventional-changelog - Generate changelogs from commit messages
- release-please - Automate releases with conventional commits
- Keep subject lines concise (50 characters or less)
- Use imperative mood in subject line ("Add feature" not "Added feature")
- Capitalize the subject line
- Don't end the subject line with a period
- Separate subject from body with a blank line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
✅ Do:
- Write clear, meaningful commit messages
- Use the specified format consistently
- Reference issues and PRs where appropriate
- Include breaking changes in footer
❌ Don't:
- Write vague messages ("Fix bug", "Update code")
- Mix multiple unrelated changes
- Forget to mention breaking changes
- Skip the emoji if your team uses them
Feel free to submit pull requests to add more commit types, tools, or resources to this list.