heartstartwittertwitter-xlistgridlightdark
gitmoji

An emoji guide for your commit messages

Specification

You can extend Gitmoji and make it your own, but in case you want to follow the official specification, please continue reading 👀

A gitmoji commit message consists is composed using the following pieces:

  • intention: The intention you want to express with the commit, using an emoji from the list. Either in the :shortcode: or unicode format.
  • scope: An optional string that adds contextual information for the scope of the change.
  • message: A brief explanation of the change.
<intention> [scope?][:?] <message>

Examples

  • ⚡️ Lazyload home screen images.
  • 🐛 Fix `onClick` event handler
  • 🔖 Bump version `1.2.0`
  • ♻️ (components): Transform classes to hooks
  • 📈 Add analytics to the dashboard
  • 🌐 Support Japanese language
  • ♿️ (account): Improve modals a11y

Shortcode vs Unicode format

You'll notice that when using emojis in commits, it's possible to use either the shortcode or the unicode format.

The difference between both is that the unicode represents the emoji itself while the shortcode is a text representation of the emoji that will be converted to the unicode character when rendered on a Git platform, such as GitHub, GitLab etc.

Both approaches are completely fine, you can choose the one you're most comfortable and suits you best. Let's understand the pros and cons of each approach so you can decide on it:

Unicode

Pros ✅

  • It represents the actual emoji no external systems are needed.
  • Better git log.
  • Easier to type.
  • Takes less characters of the commit title.

Cons ❌

  • Might not be supported in all terminals / operating systems.

Shortcode

Pros ✅

  • Supported everywhere as it's a text representation of the emoji.

Cons ❌

  • You'll need a platform / system that knows how to properly render the shortcode.
  • Different platforms / systems might use different shortcode namings, eg: GitHub and GitLab have some differences.
  • Takes more characters of the commit title.