[Git 3] Tidy Commit Messages with Gitmoji: the 20 Most Used

The 20 most used Gitmoji grouped into code, documentation, tests/CI and dependencies

Written by

in

Say git log --oneline shows a list like this.

a1b2c3d ✨ Add AXI burst support to DMA
d4e5f6a 🐛 Fix FIFO pointer wrap at depth boundary
0789abc 📝 Update register map document
b1c2d3e ✅ Add random test for burst length
f4e5d6c 💚 Fix CI timeout in nightly regression

From the emoji alone you can tell which commits add features and which fix bugs, update documents, add tests or fix CI. This is Gitmoji, a name made from Git and emoji: a convention that standardizes the purpose of a commit as an emoji.

General rules for writing commit messages are covered in 5 coding guidelines that work in any language.


Start with just 20

The full list on gitmoji.dev has more than 70 emoji. That allows fine distinctions, but if you try to use all of them from the start, choosing takes time and everyone uses them differently, which blurs the meaning. So it is better to start with only the ones used most often.

The 20 most used Gitmoji grouped into code, documentation, tests/CI and dependencies
Figure 1. The most used Gitmoji in four groups. Learning just these covers most commits.

Code

Emoji Code When
✨ :sparkles: A new feature
🐛 :bug: A bug fixed after finding the cause
🚑️ :ambulance: An urgent temporary fix (the cause may still be unclear)
🩹 :adhesive_bandage: A simple fix for a minor problem
♻️ :recycle: Refactoring (same behavior, better maintainability)
🏗️ :building_construction: Architectural change (a large change for features or performance)
🚧 :construction: Work in progress (WIP)
🔥 :fire: Removing code or files
🔨 :hammer: Adding or changing development scripts
🔖 :bookmark: Release or version tag

Documentation

Emoji Code When
📝 :memo: Documents outside the code (README, specs and so on)
💡 :bulb: Comments inside the code
✏️ :pencil2: Fixing typos (in documents and comments alike)

Tests, verification and CI

Emoji Code When
✅ :white_check_mark: Adding or changing tests
🧪 :test_tube: Adding a deliberately failing test (to reproduce a bug)
👷 :construction_worker: Adding or changing the CI build system
💚 :green_heart: Fixing a broken CI build

Dependencies

Emoji Code When
🔀 :twisted_rightwards_arrows: Bringing in changes from another branch (or repository)
⬆️ :arrow_up: Upgrading a dependency version
➕ :heavy_plus_sign: Adding a dependency
📌 :pushpin: Pinning a dependency to a specific version

💡 In a workspace made of several repositories, ⬆️ or 📌 fits well when you bump a child repository's new commit into the parent. (See WIT: multiple Git repositories as one workspace.)


Telling confusing emoji apart

🎨 vs 🏗️ vs ♻️: you changed code, but for what?

Emoji Purpose Example
🎨 :art: Only tidies the shape so it reads better (a kind of beautify) Cleaning up indentation, aligning ports
♻️ :recycle: Changes the structure to make maintenance easier. Same behavior Extracting duplicated logic into a function
🏗️ :building_construction: Changes the structure for features or performance. Behavior may change Adding a pipeline stage, changing the bus structure

🩹 vs 🚑️ vs 🐛 vs 🥅: you fixed a problem, but how?

Emoji Meaning
🩹 :adhesive_bandage: A simple fix, before a problem appears or for a minor error
🚑️ :ambulance: A temporary measure that stops the problem quickly for now. The cause may still be unknown
🐛 :bug: A proper fix after finding the cause
🥅 :goal: Adding or changing error-handling routines

If you stopped something quickly with 🚑️, the natural follow-up is to find the cause later and fix it properly with 🐛.

📝 vs 💡 vs ✏️ vs 💬: you edited text, but where?

Emoji Target
📝 :memo: Documents outside the code
💡 :bulb: Comments inside the code
✏️ :pencil2: Typos, whatever the kind
💬 :speech_balloon: Strings shown on screen or to users (messages, log text)

✨ vs 🍱: you added something new, but what?

Emoji Meaning
✨ :sparkles: Adds a new feature to an existing module
🍱 :bento: Adds new assets. In design, it can be read as adding a new module

🩺 vs 🦺: you handle abnormal situations, but how?

Emoji Meaning
🩺 :stethoscope: Only checks and reports abnormal inputs or states (health check)
🦺 :safety_vest: Defensive code that prevents misbehavior, whether or not it reports

Easier choosing with gitmoji-cli

If memorizing emoji codes every time is a hassle, use gitmoji-cli. It helps you pick an emoji and type the message interactively.

npm install -g gitmoji-cli      # needs Node.js

gitmoji -l                      # show the full list
gitmoji -s bug                  # search by keyword
gitmoji -c                      # commit interactively (pick emoji → title → body)

Install a Git hook (prepare-commit-msg) with gitmoji -i, and the emoji picker appears automatically when you run git commit as usual. You can also choose in the settings whether to insert the actual character (✨) or the code (:sparkles:). GitLab and GitHub both display codes such as :sparkles: as emoji.


Summary

  • Gitmoji is a convention for showing a commit's purpose with one emoji at the very start.
  • At first, have the team agree on and use the 20 most common only.
  • Confusing ones: 🎨/♻️/🏗️ (shape, maintenance, structure), 🩹/🚑️/🐛/🥅 (simple, temporary, root cause, error handling), 📝/💡/✏️/💬 (documents, comments, typos, strings).
  • gitmoji-cli makes choosing easier.

Further reading

Git (5 posts)

  1. Git Basics: From Installation to Branches, Conflicts and Merge Requests
  2. Practical Git Commands and Tips: stash, add -p, insteadOf
  3. Tidy Commit Messages with Gitmoji: the 20 Most Used Reading now
  4. Managing Large Binaries with Git LFS
  5. Exchanging Changes with diff and patch, Including the -p Option

See the full Tech Notes index

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *