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)