Cave Drawings: Emojis and Commit Messages
Tags: git, github, optimization, productivity
Published: 2020-10-06 17:22:33

Years ago a friend of mine refused to use emojis in text messages because, in his words, _"emojis relegate us to being cavemen"_. Like any good friend I respectfully disagreed and sent the next several text messages composed entirely of emojis. He was not amused. 

![Caveman speaking with the caption, "Because I'm a caveman and that's the way I think"](https://media.giphy.com/media/eJLXXjN1ZGS4g/source.gif)

---

## 🖼️ A Picture is Worth a Thousand Words

The oldest forms of recorded history that we've discovered are some [cave drawings from ~30,000 BC][cave-drawings]. To this day they we can observe an ancient buffalo hunt. I like to imagine some hunters huddled around the fire, enjoying the spoils of their hunt, and bragging to each other about how epic the day was. 

The drawings provided a medium for them to share their experience with others without having to retell it.

In comparison, the [oldest examples of written language][written-language] were found to be from ~25,000 years later. 

Let that soak in for a second. 

**Pictographs were the de facto method of recording history for 25,000 years.**

## 📩 Commit Clarity

This got my developer brain thinking...

> Why can't we use emojis to convey meaning in our commit messages?

To my anti-emoji friend's point, emojis are indeed modern day cave drawings. They illustrate a common meaning without the overhead of having the reader parse written language. I mean it's been baked into our DNA for millennia. Don't believe me? Science says we [recognize pictures much faster than words][image-wpm]. So why not embrace the shorthand?

## 🚚 Emoji Commits

Thankfully, I am not the the first person to come to this conclusion. An awesome open source developer by the name of [Carlos Cuesta][carlos-cuesta] put together a [cli tool and visual guide][gitmoji] to help match up your commit subject to an emoji. I use his guide almost daily.

### 🏹 An Example: The Hunt

If those cavemen were to write their cave drawing commits today they may have looked like the following:

![Commit messages as if cavemen authored them to describe their buffalo hunt](https://dev-to-uploads.s3.amazonaws.com/i/9r8s6uy3xmjffb4toszo.gif)

Look at those beautiful emojis 💖. Here we're showing the implicit meaning of each emoji for easy comparison. Over time you'll gain a familiarity with them, especially if you use them consistently ([see guide][gitmoji]).

### 😤 The Haters

You will run into developers and/or team leads that don't see value in it and/or consider [commit subjects][commit-guidelines] to be holy ground.

To those people I ask the following questions... 

1. Do you agree that a well-formed commit subject concisely defines the work included in a given change set?
2. If so, can you provide a more concise way of illustrating intent? 
3. If so, is it better than a one character emoji?

If you get a solid answer to #3, I would love to hear about it. Until then, I am promoting emojis 💯.

Most brownfield projects are change resistant too, but it doesn't mean your commit history has to be a wall of text at the yawn festival. Do yourself a favor and throw some emojis in there. A little happiness can go a long way.

## 📘 The Wrap Up

In my opinion, emojis and commit messages are like peanut butter and jelly. They don't have to go together but when they do, oh man are they delicious 😋. 

Every coworker I've persuaded to try emoji style commits has found value in them after taking them for a spin. Personally I really enjoy putting emojis on my commits. Not only do they add clarity to commit history, they make me smile every time. 

---

Am I wrong? Agree with me? Got questions? Drop me a line in the comments, leave me a big squishy ♥️ and/or a glitter pooping 🦄.


_Today's post was brought to you by VSCode's "move line up/down" shortcut:_ <kbd>Option</kbd> + <kbd>Up/Down Arrow</kbd>

---

[cave-drawings]:https://simple.wikipedia.org/wiki/Cave_painting
[written-language]:https://en.wikipedia.org/wiki/List_of_languages_by_first_written_accounts
[image-wpm]:https://www.emailaudience.com/research-picture-worth-1000-words-marketing
[carlos-cuesta]:https://carloscuesta.me
[gitmoji]:https://gitmoji.carloscuesta.me
[commit-guidelines]:https://chris.beams.io/posts/git-commit/#seven-rules