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.