Awesome Open Source
Awesome Open Source
Sponsorship

EMOJI-LOG

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


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.

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.


More

THE WORKFLOW & MEANINGS

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

  • ๐Ÿ“ฆ NEW: Emoji meaning: A "package emoji" โ€” which can contain new stuff.
  • ๐Ÿ‘Œ IMPROVE: Emoji meaning: An "OK Hand emoji" โ€” which is meant to appreciate an improvement.
  • ๐Ÿ› FIX: Emoji meaning: A "bug emoji" โ€” which means there was a bug that got fixed.
  • ๐Ÿ“– DOCS: Emoji meaning: A "book emoji" โ€” which means documentation or notes just like in a book.
  • ๐Ÿš€ RELEASE: Emoji meaning: A "rocket emoji" โ€” which is meant to show a new release/launch.
  • ๐Ÿค– TEST: Emoji meaning: A "robot emoji" โ€” which says some test were run successfully.
  • โ€ผ๏ธ BREAKING: Emoji meaning: A "bangbang emoji" โ€” which attracts attention to a breaking change.
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.
function gcap() {
    git add . && git commit -m "$*" && git push
}

# NEW.
function gnew() {
    gcap "๐Ÿ“ฆ NEW: [email protected]"
}

# IMPROVE.
function gimp() {
    gcap "๐Ÿ‘Œ IMPROVE: [email protected]"
}

# FIX.
function gfix() {
    gcap "๐Ÿ› FIX: [email protected]"
}

# RELEASE.
function grlz() {
    gcap "๐Ÿš€ RELEASE: [email protected]"
}

# DOC.
function gdoc() {
    gcap "๐Ÿ“– DOC: [email protected]"
}

# TEST.
function gtst() {
    gcap "๐Ÿค– TEST: [email protected]"
}

# BREAKING CHANGE.
function gbrk() {
    gcap "โ€ผ๏ธ BREAKING: [email protected]"
}
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 \"[email protected]\"; git push; }; f"

  # NEW.
  new = "!f() { git cap \"๐Ÿ“ฆ NEW: [email protected]\"; }; f"
  # IMPROVE.
  imp = "!f() { git cap \"๐Ÿ‘Œ IMPROVE: [email protected]\"; }; f"
  # FIX.
  fix = "!f() { git cap \"๐Ÿ› FIX: [email protected]\"; }; f"
  # RELEASE.
  rlz = "!f() { git cap \"๐Ÿš€ RELEASE: [email protected]\"; }; f"
  # DOC.
  doc = "!f() { git cap \"๐Ÿ“– DOC: [email protected]\"; }; f"
  # TEST.
  tst = "!f() { git cap \"๐Ÿค– TEST: [email protected]\"; }; f"
  # BREAKING CHANGE.
  brk = "!f() { git cap \"โ€ผ๏ธ BREAKING: [email protected]\"; }; f"

Using

USING EMOJI-LOG

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


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:

Keyword Snippet
;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.


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.


emoji-log

  • STYLE: Flat Square
  • MARKDOWN โ†“
[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat.svg)](https://github.com/ahmadawais/Emoji-Log/)
  • HTML โ†“
<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>

emoji-log

  • STYLE: Flat Rounded
  • MARKDOWN โ†“
[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat-round.svg)](https://github.com/ahmadawais/Emoji-Log/)
  • HTML โ†“
<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>

emoji-log

  • STYLE: Non-flat Rounded
  • MARKDOWN โ†“
[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/non-flat-round.svg)](https://github.com/ahmadawais/Emoji-Log/)
  • HTML โ†“
<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>

๐Ÿ‘Œ

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.


๐Ÿ“ƒ

License & Conduct


๐Ÿ™Œ

Connect

GitHub @AhmadAwaisย (follow) To stay up to date on free & open-source software

Twitter @MrAhmadAwaisย (follow) To get #OneDevMinute daily hot tips & trolls

YouTube AhmadAwaisย (subscribe) To tech talks & #OneDevMinute videos

Blog: AhmadAwais.comย (read) In-depth & long form technical articles

LinkedIn @MrAhmadAwaisย (connect) On the LinkedIn profile y'all



Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (66,512)ย 
git (741)ย 
vscode (339)ย 
workflow (304)ย 
emoji (175)ย 

Find Open Source By Browsing 7,000 Topics Across 59 Categories

Advertising ๐Ÿ“ฆ10
All Projects
Application Programming Interfaces ๐Ÿ“ฆ124
Applications ๐Ÿ“ฆ192
Artificial Intelligence ๐Ÿ“ฆ78
Blockchain ๐Ÿ“ฆ73
Build Tools ๐Ÿ“ฆ113
Cloud Computing ๐Ÿ“ฆ80
Code Quality ๐Ÿ“ฆ28
Collaboration ๐Ÿ“ฆ32
Command Line Interface ๐Ÿ“ฆ49
Community ๐Ÿ“ฆ83
Companies ๐Ÿ“ฆ60
Compilers ๐Ÿ“ฆ63
Computer Science ๐Ÿ“ฆ80
Configuration Management ๐Ÿ“ฆ42
Content Management ๐Ÿ“ฆ175
Control Flow ๐Ÿ“ฆ213
Data Formats ๐Ÿ“ฆ78
Data Processing ๐Ÿ“ฆ276
Data Storage ๐Ÿ“ฆ135
Economics ๐Ÿ“ฆ64
Frameworks ๐Ÿ“ฆ215
Games ๐Ÿ“ฆ129
Graphics ๐Ÿ“ฆ110
Hardware ๐Ÿ“ฆ152
Integrated Development Environments ๐Ÿ“ฆ49
Learning Resources ๐Ÿ“ฆ166
Legal ๐Ÿ“ฆ29
Libraries ๐Ÿ“ฆ129
Lists Of Projects ๐Ÿ“ฆ22
Machine Learning ๐Ÿ“ฆ347
Mapping ๐Ÿ“ฆ64
Marketing ๐Ÿ“ฆ15
Mathematics ๐Ÿ“ฆ55
Media ๐Ÿ“ฆ239
Messaging ๐Ÿ“ฆ98
Networking ๐Ÿ“ฆ315
Operating Systems ๐Ÿ“ฆ89
Operations ๐Ÿ“ฆ121
Package Managers ๐Ÿ“ฆ55
Programming Languages ๐Ÿ“ฆ245
Runtime Environments ๐Ÿ“ฆ100
Science ๐Ÿ“ฆ42
Security ๐Ÿ“ฆ396
Social Media ๐Ÿ“ฆ27
Software Architecture ๐Ÿ“ฆ72
Software Development ๐Ÿ“ฆ72
Software Performance ๐Ÿ“ฆ58
Software Quality ๐Ÿ“ฆ133
Text Editors ๐Ÿ“ฆ49
Text Processing ๐Ÿ“ฆ136
User Interface ๐Ÿ“ฆ330
User Interface Components ๐Ÿ“ฆ514
Version Control ๐Ÿ“ฆ30
Virtualization ๐Ÿ“ฆ71
Web Browsers ๐Ÿ“ฆ42
Web Servers ๐Ÿ“ฆ26
Web User Interface ๐Ÿ“ฆ210