Home

Awesome

<h1 align="center"> <a href="https://github.com/ahmadawais/Emoji-Log"><img src="https://user-images.githubusercontent.com/960133/120058277-31849580-c063-11eb-80f7-d92ff54560d8.png" /></a>

EMOJI-LOG

</h1>

After building hundreds of open source software I've ended up inventing a git commit log standard called EMOJI-LOG that helps me understand a project's history with a less cognitive load just by looking at the git log.

emoji-log

<br>

Philosophy

PHILOSOPHY

I like emoji. I like ’em a lot. Programming, code, geeks/nerds, open-source, all of that is inherently dull and sometimes boring. Emoji (which is, in fact, the plural of emoji) helps me add colors and emotions to the mix. Nothing wrong if you want to attach feelings to this 2D flat text-based world of code. I found out that instead of memorizing hundreds of emoji it's better to keep the categories small and general.

  1. IMPERATIVE
    • Make your Git commit messages imperative.
    • Write a commit message like you're giving an order.
    • E.g., Use ✅ Add instead of ❌ Added.
    • E.g., Use ✅ Create instead of ❌ Creating.
  2. RULES
    • A small number of categories — easy to memorize.
    • Nothing more nothing less.
    • E.g. 📦 NEW, 👌 IMPROVE, 🐛 FIX, 📖 DOC, 🚀 RELEASE, 🤖 TEST, and ‼️ BREAKING
  3. ACTIONS
    • Make git commits based on the actions you take.
    • Use a good editor like VSCode to commit the right files with commit messages.
<br>

Start

GETTING STARTED

Only use the following Git Commit Messages. A simple and small footprint is critical here.

  1. 📦 NEW: IMPERATIVE_MESSAGE_GOES_HERE

    Use when you add something entirely new. E.g. 📦 NEW: Add Git ignore file

  2. 👌 IMPROVE: IMPERATIVE_MESSAGE_GOES_HERE

    Use when you improve/enhance piece of code like refactoring etc. E.g. 👌 IMPROVE: Remote IP API Function

  3. 🐛 FIX: IMPERATIVE_MESSAGE_GOES_HERE

    Use when you fix a bug — need I say more? E.g. 🐛 FIX: Case conversion

  4. 📖 DOC: IMPERATIVE_MESSAGE_GOES_HERE

    Use when you add documentation like README.md, or even inline docs. E.g. 📖 DOC: API Interface Tutorial

  5. 🚀 RELEASE: IMPERATIVE_MESSAGE_GOES_HERE

    Use when you release a new version. E.g. 🚀 RELEASE: Version 2.0.0

  6. 🤖 TEST: IMPERATIVE_MESSAGE_GOES_HERE

    Use when it's related to testing. E.g. 🤖 TEST: Mock User Login/Logout

  7. ‼️ BREAKING: IMPERATIVE_MESSAGE_GOES_HERE

    Use when releasing a change that breaks previous versions. E.g. ‼️ BREAKING: Change authentication protocol

— That's it for now. Nothing more nothing less.

<br>

More

THE WORKFLOW & MEANINGS

I'd like to share what each of these emojis mean.

VSCode Extension

If you use VSCode, then I have built an extension Emoji-Log for VSCode. This can help you write git commit messages quickly.

Bash/Zsh Workflow

For quick prototyping, I have made the following functions that you can add to your .bashrc/.zshrc files and use Emoji-Log quickly.

#.# Better Git Logs.
### Using EMOJI-LOG (https://github.com/ahmadawais/Emoji-Log).

# Git Commit, Add all and Push — in one step.
gcap() {
    git add . && git commit -m "$*" && git push
}

# NEW.
gnew() {
    gcap "📦 NEW: $@"
}

# IMPROVE.
gimp() {
    gcap "👌 IMPROVE: $@"
}

# FIX.
gfix() {
    gcap "🐛 FIX: $@"
}

# RELEASE.
grlz() {
    gcap "🚀 RELEASE: $@"
}

# DOC.
gdoc() {
    gcap "📖 DOC: $@"
}

# TEST.
gtst() {
    gcap "🤖 TEST: $@"
}

# BREAKING CHANGE.
gbrk() {
    gcap "‼️ BREAKING: $@"
}
gtype() {
NORMAL='\033[0;39m'
GREEN='\033[0;32m'
echo "$GREEN gnew$NORMAL — 📦 NEW
$GREEN gimp$NORMAL — 👌 IMPROVE
$GREEN gfix$NORMAL — 🐛 FIX
$GREEN grlz$NORMAL — 🚀 RELEASE
$GREEN gdoc$NORMAL — 📖 DOC
$GREEN gtst$NORMAL — 🧪️ TEST
$GREEN gbrk$NORMAL — ‼️ BREAKING"
}
Fish Shell Workflow

To install these functions for the fish shell, run the following commands:

function gcap; git add .; and git commit -m "$argv"; and git push; end;
function gnew; gcap "📦 NEW: $argv"; end
function gimp; gcap "👌 IMPROVE: $argv"; end;
function gfix; gcap "🐛 FIX: $argv"; end;
function grlz; gcap "🚀 RELEASE: $argv"; end;
function gdoc; gcap "📖 DOC: $argv"; end;
function gtst; gcap "🤖 TEST: $argv"; end;
function gbrk; gcap "‼️ BREAKING: $argv"; end;
funcsave gcap
funcsave gnew
funcsave gimp
funcsave gfix
funcsave grlz
funcsave gdoc
funcsave gtst
funcsave gbrk
Git Aliases

If you prefer, you can paste these aliases directly in your ~/.gitconfig file:

# Make sure you're adding under the [alias] block.
[alias]
  # Git Commit, Add all and Push — in one step.
  cap = "!f() { git add .; git commit -m \"$@\"; git push; }; f"

  # NEW.
  new = "!f() { git cap \"📦 NEW: $@\"; }; f"
  # IMPROVE.
  imp = "!f() { git cap \"👌 IMPROVE: $@\"; }; f"
  # FIX.
  fix = "!f() { git cap \"🐛 FIX: $@\"; }; f"
  # RELEASE.
  rlz = "!f() { git cap \"🚀 RELEASE: $@\"; }; f"
  # DOC.
  doc = "!f() { git cap \"📖 DOC: $@\"; }; f"
  # TEST.
  tst = "!f() { git cap \"🤖 TEST: $@\"; }; f"
  # BREAKING CHANGE.
  brk = "!f() { git cap \"‼️ BREAKING: $@\"; }; f"
<br>

Using

USING EMOJI-LOG

Here's a list of repos that make use of Emoji-Log.

<br>

AlfredSnippets

Alfred Snippets

Alfred PowerPack users can use the Snippets feature to quickly call Emoji-Log, or use the text expand feature for even quicker creation.

To setup:

  1. Have Alfred 3 with PowerPack installed
  2. For auto expansion, in Alfred Settings » Features » Snippets ensure the "Automatically expand snippets by Keyword" box is checked
  3. Download & open Emoji-Log.alfredsnippets, deselecting "Strip snippets of 'auto expand' flag" when prompted

This will give the following text expander keywords for the Emoji-Log:

KeywordSnippet
;gnew📦 NEW:
;gimp👌 IMPROVE:
;gfix🐛 FIX:
;grlz🚀 RELEASE:
;gdoc📖 DOC:
;gtst🤖 TEST:
;gbrk‼️ BREAKING:

To edit the ; prefix to your preferred expansion flag, double click right click the Emoji-Log Collection in Alfred Settings » Features » Snippets.

TextExpander Snippets are also available. Download & open Emoji-Log.textexpander to import.

<br>

badge

EMOJI-LOG BADGE COLLECTION

If your repo uses EMOJI-LOG then you can add any of the following badges to your read me and send me a PR to list your repo here.

<br>

emoji-log

[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat.svg)](https://github.com/ahmadawais/Emoji-Log/)
<a href="https://github.com/ahmadawais/Emoji-Log/"><img alt="emoji-log" src="https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat.svg" /></a>
<br>

emoji-log

[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat-round.svg)](https://github.com/ahmadawais/Emoji-Log/)
<a href="https://github.com/ahmadawais/Emoji-Log/"><img alt="emoji-log" src="https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat-round.svg" /></a>
<br>

emoji-log

[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/non-flat-round.svg)](https://github.com/ahmadawais/Emoji-Log/)
<a href="https://github.com/ahmadawais/Emoji-Log/"><img alt="emoji-log" src="https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/non-flat-round.svg" /></a>
<br>

👌

Sponsor

Me (Ahmad Awais) and my incredible wife (Maedah Batool) are two engineers who fell in love with open source and then with each other. You can read more about me here. If you or your company use any of my projects or like what I’m doing then consider backing me. I'm in this for the long run. An open-source developer advocate.

<br>

📃

License & Conduct

<br>

🙌

Connect

<div align="left"> <p><a href="https://github.com/ahmadawais"><img alt="GitHub @AhmadAwais" align="center" src="https://img.shields.io/badge/GITHUB-gray.svg?colorB=6cc644&style=flat" /></a>&nbsp;<small><strong>(follow)</strong> To stay up to date on free & open-source software</small></p> <p><a href="https://twitter.com/MrAhmadAwais/"><img alt="Twitter @MrAhmadAwais" align="center" src="https://img.shields.io/badge/TWITTER-gray.svg?colorB=1da1f2&style=flat" /></a>&nbsp;<small><strong>(follow)</strong> To get #OneDevMinute daily hot tips & trolls</small></p> <p><a href="https://www.youtube.com/AhmadAwais"><img alt="YouTube AhmadAwais" align="center" src="https://img.shields.io/badge/YOUTUBE-gray.svg?colorB=ff0000&style=flat" /></a>&nbsp;<small><strong>(subscribe)</strong> To tech talks & #OneDevMinute videos</small></p> <p><a href="https://AhmadAwais.com/"><img alt="Blog: AhmadAwais.com" align="center" src="https://img.shields.io/badge/MY%20BLOG-gray.svg?colorB=4D2AFF&style=flat" /></a>&nbsp;<small><strong>(read)</strong> In-depth & long form technical articles</small></p> <p><a href="https://www.linkedin.com/in/MrAhmadAwais/"><img alt="LinkedIn @MrAhmadAwais" align="center" src="https://img.shields.io/badge/LINKEDIN-gray.svg?colorB=0077b5&style=flat" /></a>&nbsp;<small><strong>(connect)</strong> On the LinkedIn profile y'all</small></p> </div>