Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Lyokolux
Lyokolux

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.

gitmojiemojiSens
: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)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
alanmckenna profile image
Alan McKenna
  • Location
    Scotland
  • Joined
• Edited on• Edited

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!

CollapseExpand
 
lyokolux profile image
Lyokolux
👋 A developer interested in FLOSS, self-hosting and web technologies
  • Location
    Germany
  • Work
    Work student
  • Joined

About a standard, the gitmoji projectchanges. So yes it is needed to agree on a standard.

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

👋 A developer interested in FLOSS, self-hosting and web technologies
  • Location
    Germany
  • Work
    Work student
  • Joined

Trending onDEV CommunityHot

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp