Loading...
Spice Up Your Git Messages

Spice Up Your Git Messages

Used: Β Β git version 2.17.1Β 

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.

git
Please remember the terms for blog comments.