Git Commit Emoji Usage Guide

2 min
AI 总结
$
|
Article Summary Image
Article Summary Image

Why Use Emoji?

Using Emoji to mark commit messages has the following advantages:

  • Visual Intuition - Identify commit types at a glance
  • Improved Efficiency - Quickly understand project history
  • Standardization - Maintain consistency in team collaboration
  • Fun - Make boring commit logs more lively ::

Common Emoji Conventions

::tab{

=’[“Core Features”, “Documentation & Config”, “Testing”, “Dependencies & Build”, “Security & Fixes”, “Development Process”, “Others”]’} #tab1

EmojiCodeDescriptionExample
:sparkles:Introduce new features✨ Add user login functionality
🐛:bug:Fix bugs🐛 Fix navbar display issue on mobile
🔥:fire:Remove code or files🔥 Remove deprecated old API
♻️:recycle:Refactor code♻️ Refactor user authentication module
⚡️:zap:Improve performance⚡️ Optimize image loading speed
💄:lipstick:Update UI and styles💄 Adjust button styles and colors

#tab2

EmojiCodeDescriptionExample
📝:memo:Add or update documentation📝 Update API usage documentation
🎨:art:Improve code structure/format🎨 Format code and optimize imports
🔧:wrench:Add or update configuration files🔧 Update ESLint configuration
🌐:globe_with_meridians:Internationalization and localization🌐 Add English translation

#tab3

EmojiCodeDescriptionExample
:white_check_mark:Add or update tests✅ Add user registration unit tests
🧪:test_tube:Add failing tests🧪 Add boundary condition test cases
🤡:clown_face:Mock data and tests🤡 Add API mock data

#tab4

EmojiCodeDescriptionExample
⬆️:arrow_up:Upgrade dependencies⬆️ Upgrade React to v18
⬇️:arrow_down:Downgrade dependencies⬇️ Downgrade Node version to fix compatibility
:heavy_plus_sign:Add dependencies➕ Add Axios dependency
:heavy_minus_sign:Remove dependencies➖ Remove unused lodash
📦:package:Add or update compiled files📦 Update build configuration
👷:construction_worker:Add or update CI build system👷 Add GitHub Actions workflow

#tab5

EmojiCodeDescriptionExample
🔒:lock:Fix security issues🔒 Fix XSS vulnerability
🚨:rotating_light:Fix compiler/linter warnings🚨 Fix TypeScript type errors
🩹:adhesive_bandage:Simple fix for non-critical issues🩹 Fix console warning messages
🚑:ambulance:Critical hotfix🚑 Emergency fix for production crash

#tab6

EmojiCodeDescriptionExample
🚧:construction:Work in progress🚧 Implement payment feature (in progress)
💚:green_heart:Fix CI build issues💚 Fix CI test failures
🔖:bookmark:Release/version tags🔖 Release v1.2.0
🎉:tada:Initialize project🎉 Initialize project structure
🗃️:card_file_box:Database-related changes🗃️ Add user table index

#tab7

EmojiCodeDescriptionExample
💡:bulb:Add or update source code comments💡 Add comments for complex algorithms
🔊:loud_sound:Add or update logs🔊 Add detailed error logging
🔇:mute:Remove logs🔇 Remove debug logs
🚀:rocket:Deploy features🚀 Deploy to production
👽:alien:Update code due to external API changes👽 Update to adapt to new Google Maps API
🍱:bento:Add or update assets🍱 Add product images and icons
♿️:wheelchair:Improve accessibility♿️ Add ARIA labels to improve accessibility
🥚:egg:Add or update easter eggs🥚 Add Konami code easter egg
🙈:see_no_evil:Add or update .gitignore🙈 Ignore .env files
::

VS Code Plugin Recommendations

  • Gitmoji - Provides emoji picker
  • Conventional Commits - Standardizes commit message format
  • Git Emoji Commit - Quickly insert emoji