Emoji log is a new way to write your Git Commit Messages. I like emoji. I like โem a lot. Programming, code, geeks, nerds, open source, all of that is inherently dull and sometimes boring. I improve that by using Emoji.
I also am a big fan of the Don’t Repeat Yourself (DRY) philosophy and believe writing better Git commit messagesโones that are contextual enough to serve as a changelog for your open source softwareโis an important component of DRY.
One of the many workflows I’ve written is Emoji-Log, a straightforward, open source Git commit log standard. It improves the developer experience (DX) by using emoji to create better Git commit messages. For more check out my article on OpenSource.com
Emoji-Log’s philosophy
Instead of memorizing hundreds of emoji, I’ve learned it’s better to keep the categories small and general. Here’s the philosophy that guides writing commit messages with Emoji-Log:
- IMPERATIVE: Make your Git commit messages imperative. Write commit message like you’re giving an order.
โ Use โ
Add instead of โ Added.
โ Use โ
Create instead of โ Creating.
- RULES: A small number of categories are easy to memorize. Nothing more, nothing less. There are only six types of Emoji log. One should only use these six types and nothing else. Which are
โ ๐ฆ NEW: [Git Commit Message goes here]
โ ๐ IMPROVE: [Git Commit Message goes here]
โ ๐ FIX: [Git Commit Message goes here]
โ ๐ DOC: [Git Commit Message goes here]
โ ๐ RELEASE: [Git Commit Message goes here]
โ โ
TEST: [Git Commit Message goes here]
- ACTIONS: Make Git commits based on actions you take. Use a good editor like VSCode to commit the right files with commit messages.
Marco
This is great! One silly question if I may… When trying to add and commit one item, I can’t seem to figure out the best way to do this. I have tried e.g.
git add then
git commit -m “:package: Add nav and logo”
This gives me the desired result in my github repo but in my git log I see :package: rather than the box emoji. I’ve also tried using U+1F4D6 instead of :package:
If I use gnew/gimp etc. everything works as expected.
What am I screwing up?
Ahmad Awais
Glad you liked it. A couple of things.
1. I recommend using actual emoji instead of
:package:
like shortcodes that only work for GitHub which is no Git2. Read Show Emoji in Git Log post to update your Git’s pager
3. I recommend using one of these workflows โ
Peace! โ๏ธ