DEV Community

Cover image for Use emojis in your commit messages ๐Ÿฅณ
Idil Saglam for Makepad

Posted on

Use emojis in your commit messages ๐Ÿฅณ

Most of the time, it's difficult to understand the impact of a commit just from the commit message. You can, of course, create your own commit conventions or follow one of the existing conventions. You probably already saw a commit message like chore: implementing xyz feature. It's boring, isn't it?

How about using emojis in our commit messages to make them fun? ๐Ÿคฉ

Yes, you read that right. In this article, I will present Gitmoji. I have been using it for two years, and I must admit that it is a game changer and really easy to use.


Getting Started

Installation

Check out their README file. The installation is also pretty simple. You can either install the npm package or the homebrew formulae.

# Installing via npm
npm i -g gitmoji-cli

# Installing via Homebrew
brew install gitmoji
Enter fullscreen mode Exit fullscreen mode

Usage

After installing the CLI, you are ready to use. As usual add your files that you want to commit via git add <file_path_to_add> and just run the command gitmoji -c.

$ gitmoji -c
? Choose a gitmoji: (Use arrow keys or type to search)
โฏ ๐ŸŽจ  - Improve structure / format of the code. 
  โšก๏ธ  - Improve performance. 
  ๐Ÿ”ฅ  - Remove code or files. 
  ๐Ÿ›  - Fix a bug. 
  ๐Ÿš‘  - Critical hotfix. 
  โœจ  - Introduce new features. 
  ๐Ÿ“  - Add or update documentation. 
(Move up and down to reveal more choices)
Enter fullscreen mode Exit fullscreen mode

CLI provides some prompts and allows you to select the most appropriate emoji for your commit message from a list.

$ gitmoji -c
? Choose a gitmoji: add
โฏ โž•  - Add a dependency. 
  ๐Ÿ“  - Add or update documentation. 
  โœ…  - Add or update tests. 
  ๐Ÿ“„  - Add or update license. 
  ๐Ÿฑ  - Add or update assets. 
  ๐Ÿ”Š  - Add or update logs. 
  ๐Ÿ‘ฅ  - Add or update contributor(s). 
(Move up and down to reveal more choices)
Enter fullscreen mode Exit fullscreen mode

But wait โ€“ thereโ€™s more

How does this look in a GitHub repo?

Gitmoji commit messages in GitHub
Isn't it awesome and fun?

Yay or Nay?

Cons

As in every convention, the reader should follow the convention in order to understand entirely.

Emojis are not ASCII characters, most of them are Unicode characters. Some tools may not support emojis at all or some of them may support only Unicode emojis.

Pros

I love emojis. Emojis are fun, and the GitHub repository looks better with them. It is fun to use, and it encourages writing commits.

Conclusion

It is easy to install and use and take your commits into an other level. I definitely recommend!

Happy coding!๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป

Top comments (0)