Awesome Git Commit Conventions Awesome

A curated list of awesome Git commit conventions, tools, resources, and best practices.

Contents

Commit Types

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

Message Format

The commit message should be structured as follows:

<emoji> <type>(<scope>): <subject>

<body>

<footer>

Components

  • emoji: A visual indicator of the commit type
  • type: The category of the commit change
  • scope: The module/component being modified (optional)
  • subject: A brief description of the change
  • body: Detailed explanation of the change (optional)
  • footer: Reference to issues, breaking changes, etc. (optional)

Examples

Feature Addition

✨ feat(auth): add Google OAuth2 login

- Implement OAuth2 client configuration
- Add user profile mapping
- Update session management

Closes #123

Bug Fix

πŸ› fix(api): prevent payment processing race condition

Added mutex lock to prevent double-charging during concurrent requests.

Fixes #456

Security Update

πŸ”’ 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

Tools

Commit Linting

Commit Generation

Changelog Generation

Guidelines

Best Practices

  1. Keep subject lines concise (50 characters or less)
  2. Use imperative mood in subject line ("Add feature" not "Added feature")
  3. Capitalize the subject line
  4. Don't end the subject line with a period
  5. Separate subject from body with a blank line
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why vs. how

Do's and Don'ts

βœ… 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

Contributing

Feel free to submit pull requests to add more commit types, tools, or resources to this list.

and pls not use the default Update file messageπŸ™