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
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)
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)
But wait โ thereโs more
How does this look in a GitHub repo?
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)