Skip to content

Latest commit

Β 

History

History
294 lines (209 loc) Β· 9.47 KB

README.md

File metadata and controls

294 lines (209 loc) Β· 9.47 KB

EMOJI-LOG

After building hundreds of open source software I've ended up inventing a git commit log standard called EMOJI-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 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, and βœ… TEST
  3. ACTIONS ↓
    • Make git commits based on 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 converter

  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 you release a new version. E.g. βœ… TEST: Mock User Login/Logout

  7. πŸ’₯ GIT: SOME_MESSAGE_GOES_HERE

    Use when you have some git related message. E.g. πŸ’₯ GIT: This is a merge

  8. πŸ˜… TRY: IMPERATIVE_MESSAGE_GOES_HERE

    Use when you might break code due to that commit. E.g. πŸ˜… TRY: I don't know what I am doing

β€” 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 "check emoji" β€” which says some test were written.
  • πŸ’₯ GIT: Emoji meaning: A "blast emoji" - which says the commit was git related
  • πŸ˜… TRY: Emoji meaning: A "sweat emoji" - which is to be used when commits might break stuffs and might not even work.

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

#################
# Git Emoji-Log #
#################

# Git Add all
function gta() {
    git add .
}

# Git Commit, and Push β€” in one step.
function gcap() {
    git commit -m "$1" -m "$2" && git push
}

# NEW.
function gnew() {
    gcap "πŸ“¦ NEW: $@"
}

# IMPROVE.
function gimp() {
    gcap "πŸ‘Œ IMPROVE: $@"
}

# FIX.
function gfix() {
    gcap "πŸ› FIX: $@"
}

# RELEASE.
function grlz() {
    gcap "πŸš€ RELEASE: $@"
}

# DOC.
function gdoc() {
    gcap "πŸ“– DOC: $@"
}

# TEST.
function gtst() {
    gcap "βœ… TEST: $@"
}

# MERGE, GIT STUFFS, CONFLICTS, COMMITS THAT DON'T HAVE TO BE COMMITED.
function ggit() {
    gcap "πŸ’₯ GIT: $@"
}

# COMMITS THAT YOU ARE SURE MIGHT GO WRONG, BUT YOU STILL NEED TO COMMIT.
function gtry() {
    gcap "πŸ˜… TRY: $@"
}

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 ggit; gcap "πŸ’₯ GIT: $argv"; end;
function gtry; gcap "πŸ˜… TRY: $argv"; end;
funcsave gcap
funcsave gnew
funcsave gimp
funcsave gfix
funcsave grlz
funcsave gdoc
funcsave gtst
funcsave ggit
funcsave gtry

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"

Using

USING EMOJI-LOG

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


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>

Hello

If you'd like us to keep producing professional free and open source software (FOSS). Consider paying for an hour of my dev-time. We'll spend two hours on open source for each contribution. Yeah, that's right, you pay for one hour and get both of us to spend an hour as a thank you.


Thanks

LICENSE & ATTRIBUTION

MIT Β© Ahmad Awais.

Thanks to Munawar for making awesome badges for this project. This FOSS (free and open source software) project is updated and maintained with the help of excellent businesses listed below. Without the support from these amazing companies/individuals, this project would not have been possible. What/How? Read more about it β†’

Feel free to say πŸ‘‹ on Twitter @MrAhmadAwais β†’