Spice Up Your Git Messages

December 12, 2019

Using GitHub or GitLab comes with benefits like Emojis. This article will present an idea of utilising Emojis in git commit messages to improve code overview.

Emojis

Before we start, we need to clarify what Emojis are. Emojis are a pictorial language used mainly in electronic messaging to express a variety of emotions, objects or ideas.

Why do we use pictures? A picture is worth a thousand words. Complex and sometimes multiple ideas can be conveyed by a single still image, which transmits its meaning or essence more effectively than a mere verbal description.

A face with tears of joy 😂 is also known as lol (laughing out loud). It indicates something is funny. A thumbs-up gesture 👍 means approval.

Git Emojis

GitHub and GitHub automatically render emojis by their code representation.

:joy:

is rendered to 😂. This cheat sheet is automatically generated from GitHub Emoji API and Unicode Full Emoji List.

Gitmoji

The geek project Gitmoji by Carlos Cuesta is built to make the use of emojis on GitHub commit messages. Using emojis on commit messages provides an easy way of identifying the purpose or intention of a commit with only looking at the emojis used. It has a beautiful cards overview with copy feature.

Gitmoji Cards

For a complete overview use the Gitmoji website or the Gitmoji Triangle cheat sheet.

Examples

If you fix a bug, use the bug code 🐛 in the commit message. Every developer knows that you did bug fixing.

#42 :bug: fix NPE, check input against `null`

Doing Continous Integration 👷 with Docker 🐋.

#20 :construction_worker: extend Jenkinsfile with docker :whale: build

CLI Integration

If you are not the type of developer that use web browsers or paper, Carlos Cuesta also did the Gitmoji-cli. It solves the hassle of searching through the gitmoji list. See below the CLI in action within a zsh terminal.

gitmoji-cli

Summary

If there is a common understanding within your development team, Gitmoji can enhance your development process. Do you need it all to write good commit messages? No, it adds something useful to the commit message. This is only useful if your git provider interface supports the emoji rendering. As mentioned in the following screenshot, you can spot at first sight, that the commit was bug-fixing related.

Travis CI Gitmoji

What is your opinion on this? Tell us in the comment section. Regardless Carlos Cuesta did a beautifully creative job with the gitmoji website.

About the author: Vinh Nguyên

Loves to code, hike and mostly drink black coffee. Favors Apache Kafka, Elasticsearch, Java Development and 80's music.

Comments
Join us