How to add emojis to git commits with this handy tool
Commit messages can easily look like a wall of text and, at a glance, can be hard to follow. Gitmoji, a style guide for adding emojis to your commit, makes this a problem of the past. Today we'll go through how to add emojis to git commits quickly and easily using this resource.
If you've been maintaining a project on Github for a while, it's likely you've looked at your list of commits and been disappointed by how hard to find specific things were.
And if you've been using Github long enough it's also likely you've seen projects that categorise commits by using specific emojis, for example:
- 🐛 Indicates the commit fixes a bug
- ✨ Adds a new feature
But how do people keep track of which emoji does what? Surely they can't possibly remember them all?
Enter Gitmoji, a style guide for your emoji commits
This is where Gitmoji comes in, a neat little guide to keep track of what emoji to use on your commit.
The genius behind Gitmoji is that it's amazingly simple to adopt. You can just try it out by manually copying the emojis and adding them to your messages before pushing them to Github or you can make use of the Gitmoji CLI to start using an interactive prompt.
The Gitmoji CLI essentially replaces the git commit
command for the more user-friendly gitmoji -c
, which will walk you through building a commit message.
Emoji compatibility outside of Github
Gitmoji is kind-of build for Github. Its base implementation expects the site you'll view commits on to support translating :emoji:
to an emoji character.
Unfortunately this is only supported on Github (as far as I'm aware), which means that your messages will be fairly ugly on most other platforms by default. Thankfully Gimoji is easy to customize and by simply running gitmoji -g
we can set the default emoji behavior.
I'm in love with this tool and how much better looking it's made my repositories. It's absolutely worth the install!
Hopefully that's all clear. But if you have any questions about how to add emojis to git commits, leave us a comment.
If you love Gitmoji, make sure to follow @crloscuesta on Twitter!