conventional commits with emojis

2020-10-02

 | 

~2 min read

 | 

289 words

I’ve written in the past about how much I like conventional commits as a way to standardize around the language for what is included in a commit. More recently, I’ve been looking into Git’s rebase as a method for cleaning up the commits related to small typos and / or generally organizing commits in a logical order (no more chore: typo commit messages hooray!).

I started wondering if there wasn’t a way to communicate the intention even more succinctly than conventional commits. After all, the standard is to limit git commit messages to 50 characters or less. So, every time I have to write refactor I lose 9 characters (including the space).

I’ve seen a number of folks use emoji effectively in their Git logs, and I thought that mapping emoji to the conventional commit options might achieve my goal.

My current approach is the following:

  • ✨ - feature
  • 🐛 - fix
  • 💅 - style
  • 🧼 - chore
  • 📝 - docs
  • 🏎 - perf
  • 🧪 - test
  • 🏗️ - refactor
  • 🚀 - major version bump
  • 📦 - minor version bump

Adopting this, unfortunately, will mean that I can’t use commitlint (or commitzen), but it presents an opportunity to adapt them to a more succinct approach! In the mean time, I can start adopting this approach in personal projects (like Nom and see how it’s received by my teams.

If you use GitHub and would prefer to use a shortcode rather than put an actual unicode character in your commit history (which has broken some CI platforms like TeamCity in the past), here’s a Gist of emoji shortcodes understood by GitHub.

Kudos to Alex Lee for the review and inspiration!



Hi there and thanks for reading! My name's Stephen. I live in Chicago with my wife, Kate, and dog, Finn. Want more? See about and get in touch!