How to Use Emojis in Git Commit Messages

Why Use Emojis in Git Commits?

A well-structured commit history is a form of documentation. Emojis add visual scannability โ€” a quick glance at ๐Ÿ› tells you it's a bug fix; โœจ signals a new feature; ๐Ÿ“ means documentation. When browsing hundreds of commits in git log or a GitHub repository, emojiEmoji
A Japanese word (็ตตๆ–‡ๅญ—) meaning 'picture character' โ€” small graphical symbols used in digital communication to express ideas, emotions, and objects.
prefixes let you parse the nature of each change at a glance.

The most widely adopted convention is Gitmoji (gitmoji.dev), a specification that assigns specific emojis to specific types of code changes. Many teams also use emojis alongside or instead of Conventional Commits (feat, fix, docs, etc.).

The Gitmoji Convention

Gitmoji defines a standardized vocabulary. Here are the most commonly used entries:

Emoji Code Meaning
โœจ :sparkles: Introduce new feature
๐Ÿ› :bug: Fix a bug
๐Ÿ”ฅ :fire: Remove code or files
๐Ÿ“ :memo: Add or update documentation
๐ŸŽจ :art: Improve code structure or format
โ™ป๏ธ :recycle: Refactor code
๐Ÿš€ :rocket: Deploy stuff
โœ… :white_check_mark: Add, update, or pass tests
๐Ÿ”’๏ธ :lock: Fix security issue
โฌ†๏ธ :arrow_up: Upgrade dependencies
โฌ‡๏ธ :arrow_down: Downgrade dependencies
๐Ÿšง :construction: Work in progress
๐Ÿ’„ :lipstick: UI/style changes
๐ŸŒ :globe_with_meridians: Internationalization
โšก๏ธ :zap: Performance improvement
๐Ÿฉน :adhesive_bandage: Simple fix for non-critical issue
๐Ÿ’ก :bulb: Add or update comments in source code
๐Ÿ”‘ :key: Add or update secrets
๐Ÿ—‘๏ธ :wastebasket: Deprecate code to be cleaned up
๐Ÿท๏ธ :label: Add or update types

How to Write an Emoji Commit

Using the Literal Emoji Character

The simplest approach is to paste the emoji character directly into your commit message:

git commit -m "โœจ Add user avatar upload feature"
git commit -m "๐Ÿ› Fix null pointer in payment processor"
git commit -m "๐Ÿ“ Update API authentication docs"

This works on any modern terminal, GitHub, GitLab, Bitbucket, and most CI/CD dashboards. The emoji is stored as a literal UTF-8UTF-8
A variable-width Unicode encoding that uses 1 to 4 bytes per character, dominant on the web (used by 98%+ of websites).
character in the commit message.

Using Shortcode Notation

Some teams prefer to write shortcodes instead of literal emojis, then render them in their tooling:

git commit -m ":sparkles: Add user avatar upload feature"
git commit -m ":bug: Fix null pointer in payment processor"
git commit -m ":memo: Update API authentication docs"

GitHub renders shortcodes in commit messages automatically โ€” :sparkles: becomes โœจ in the GitHub web UI. However, in the terminal git log, you'll see the raw text instead of the emoji. Most teams prefer literal emojis for this reason.

Installing the Gitmoji CLI

The official Gitmoji CLI tool provides an interactive prompt for choosing emojis when you commit:

# Install with npm
npm install -g gitmoji-cli

# Use instead of git commit
gitmoji -c

Running gitmoji -c opens an interactive list. Type to search, use arrow keys to select, press Enter, then fill in the commit title and body. The CLI inserts the emoji and formats the commit for you.

Integrating with Git Hooks

You can enforce Gitmoji in a project using a commit-msg hook. Create .git/hooks/commit-msg:

#!/bin/bash
commit_msg=$(cat "$1")
if ! echo "$commit_msg" | grep -qP "^(:\w+:|[\x{1F300}-\x{1F9FF}])"; then
  echo "Error: Commit message must start with a Gitmoji emoji or shortcode."
  exit 1
fi

This rejects any commit that doesn't begin with an emoji or Gitmoji shortcode.

Combining Emojis with Conventional Commits

Some teams blend Conventional Commits format with Gitmoji:

โœจ feat(auth): add OAuth2 login support
๐Ÿ› fix(payments): handle expired card gracefully
๐Ÿ“ docs(api): add rate limiting documentation
โ™ป๏ธ refactor(db): extract query builder to separate module

This hybrid format gives you the machine-parseable type(scope): structure that tools like semantic-release use, plus the visual emoji prefix for human readers.

Viewing Emoji Commits in the Terminal

Standard git log renders emoji characters correctly in most modern terminals (iTerm2, macOS Terminal, Windows Terminal, GNOME Terminal). If your terminal shows question marks or boxes instead of emojis, the issue is usually the terminal's font or locale settings.

Fix font issues by using a Nerd Font or enabling emoji rendering in your terminal settings. Fix locale issues by ensuring LANG is set to a UTF-8 locale:

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

For a prettier log, use this alias:

git config --global alias.elog "log --oneline --graph --pretty=format:'%Cred%h%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
git elog

Emoji Commits on Platforms

GitHub: Displays literal emoji characters natively in commit messages, PR titles, issue titles, and release notes. Shortcodes are also rendered.

GitLab: Same as GitHub โ€” emoji characters and shortcodes both render.

Bitbucket: Renders literal emoji characters. Shortcode support is more limited.

Terminal git log: Shows raw UnicodeUnicode
Universal character encoding standard that assigns a unique number to every character across all writing systems and symbol sets, including emoji.
characters. Modern terminals render these correctly.

CI/CD pipelines: Most modern CI systems (GitHub Actions, GitLab CI, CircleCI) handle emoji in commit messages without issues. They're just text.

A Simple Team Emoji Policy

If Gitmoji feels like too much to memorize, start with a small set of 5โ€“6 emojis that cover 90% of commits:

Emoji When to use
โœจ New feature
๐Ÿ› Bug fix
๐Ÿ“ Documentation
โ™ป๏ธ Refactor
โฌ†๏ธ Dependency update
๐Ÿ”ง Configuration change

Document your team's chosen emoji set in the project README and stick to it. Consistency matters more than completeness.

Converting Text Descriptions to Emojis

Not sure which emoji fits your commit? EmojiFYI's text-to-emoji tool can help. Describe what your commit does in plain English and it suggests matching emojis. It's a quick way to find the right emoji without memorizing the full Gitmoji spec.

Related Tools

โœ๏ธ Text to Emoji Text to Emoji
Convert plain text messages into emoji-enriched versions. Match words to relevant emoji characters.

Glossary Terms

Emoji Emoji
A Japanese word (็ตตๆ–‡ๅญ—) meaning 'picture character' โ€” small graphical symbols used in digital communication to express ideas, emotions, and objects.
UTF-8 UTF-8
A variable-width Unicode encoding that uses 1 to 4 bytes per character, dominant on the web (used by 98%+ of websites).
Unicode Unicode
Universal character encoding standard that assigns a unique number to every character across all writing systems and symbol sets, including emoji.

Related Stories