Posted on • Originally published atblog.lyokolux.space
Use emojis to enhance commit messages
There is always a problem when choosing the commits message. It's complicated and we often end up with unclear messages like "Improve clarity".
Since then, some conventions have appeared likeAngular or more recently theConventional Commits. What if we put emojis to make it clearer? 🤘
And that's whereGitmoji comes in: putting meaning in emojis for commits messages. For example, we can have:
✨ Add new feature X
🍱 update favicon
🔥 remove unused css files
Gitmojis like:sparkles:
can be written for platforms supportingGFM (notably Github and Gitlab).
Advantages and disadvantages
The ➕
- emojis are more precise than conventions, there are a number of them
- the reading of the commit message is simplified and universal
- and it's still pretty cool
The ➖
- you need to know their meaning
- writing gitmojis can be tedious
For these negative points, there are solutions:
First the list may seem impressive, and it is! We can start with a small set of the most used and generic gitmojis.
gitmoji | emoji | Sens |
---|---|---|
:sparkles: | ✨ | Addition of a new feature |
:bug: | 🐛 | Fix a bug |
:recycle: | ♻️ | Code Refactoring |
:fire: | 🔥 | Code or file deletion |
:pencil: | 📝 | Writing documentation |
:bulb: | 💡 | Add or modify comments in the source code |
Then, you have to enter them. Tools exist for this, for example among others, theofficial site which allows you to copy and paste the gitmoji codes or directly the emojis (theCTRL+F greatly increases the search speed); ora tool in CLI; ora browser extension ✌️ make life more convenient.
Others are also available and listed ona page of the official website.
✨ Adopt a simple convention
The convention mostly used by the Gitmoji community is simple:<gitmoji> Description
. The first word of the description starts with a capital letter. That's it. Simple 💯
After several months of use, adding a scope on some posts seems quite useful to me, like:<gitmoji>(scope):
. Sometimes this lends itself well to it! Sometimes not so much. Some emojis don't need a scope: as 🙈 means "Add or update a .gitignore file.", the scope is already included in the meaning of the gitmoji.
In short
Gitmoji is awesome and fun, so you might as well use it 😄
May your commits messages be happy and clear!
Top comments(2)

Hi, great content!
I personally use Conventional Commits standard, however what you say is 💯% correct. They can can be a bit verbose, specifically the header for things like "refactor:" which takes up so many of my precious header chars!
A new member of our team introduced me to this standard and I liked how fun it was.
The main thing is to agree on a standard that works for your team, because that enables you to doso much more.
Keep up the good work!
For further actions, you may consider blocking this person and/orreporting abuse