Giter Club home page Giter Club logo

emoji-log's Introduction

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.
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"

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

emoji-log's People

Contributors

ahmadawais avatar ahollister avatar austinginder avatar bijancamp avatar davidsword avatar dsturm avatar juandc avatar meyercm avatar mihinduranasinghe avatar robertdevore avatar tallguyjenks avatar theodesp avatar vyskoczilova avatar zackkrida avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emoji-log's Issues

[PROPOSAL] Add HOTFIX as one of the approved commit messages

In a perfect world, we wouldn't need to add this. However, with client-facing software inevitably something is broken and needs to be fixed right away. Having a hotfix commit standard effectively conveys the urgency behind the commit, and provides better insight into the number of hotfixes that have been necessary throughout the history of a project. The current "fix" commit message is better-suited for non-critical issues.

I propose that we add one approved commit message in the following format:
πŸ”₯HOTFIX: IMPERATIVE_MESSAGE_GOES_HERE

With the following added shortcut:

# HOTFIX.
hot = "!f() { git cap \"πŸ”₯ HOTFIX: $@\"; }; f"

I'd be happy to discuss the merits of this in further detail, and I can open a PR for this if you think this is worth adding to the project!

Icon color

Hi there!

First of all, awesome job! I've just stumbled upon this repo, and I think I'll fully adopt it. Love the idea.

Now I open this issue because I think it'd be great to have the option to remove the color from the smiley face icon in order to match most themes out there.
I'd reckon is not that invasive, but I'd prefer to keep it simple and match all other icons.

Ref:
screenshot

Emoji to indicate removal ❌

Hey Awais πŸ‘‹, Hope you're fine. I find this repo quite useful and after following this workflow pattern I think, it would be great if there's a separate emoji to indicate the removal of a file/folder/dependency because I thought improveπŸ‘Œ or fixπŸ› might be misleading or feel irrelevant in some contexts. To indicate removal we may use emojis like: ❌, β›”, 🚫.

Initial Commit Emoji

According to this repo, you used a flame emoji (πŸ”₯) for this purpose. Why not add ini = "!f() { git cap \"πŸ”₯\"; }; f" for completeness?

[REQUEST] Designers Build An Emoji Log Badge?!

Thanks for offering to help. πŸ’―

So, I have this project which I want to launch β€” I am hopeful it will get a good amount of social media coverage. It's called Emoji log β€” a simple and concise emoji based git commit messages system that I use and now opening it up as a spec.

You can see it in action at

  1. https://github.com/ahmadawais/shades-of-purple-vscode/commits/master …
  2. https://github.com/ahmadawais/create-guten-block/commits/master …

The only thing left to do is add nice badges which people can use for their projects to show that they follow Git Emoji Log β€” https://github.com/ahmadawais/Emoji-Log#emoji-log-badge … (I'll make sure to give you the credit for designing the badges in the http://README.md file)

Here's an example of what the badge could look like (the Awesome Lists badges by Sindre) https://github.com/sindresorhus/awesome/blob/master/awesome.md#awesome-badge

Looking forward! Peace! ✌️

Typo in README.md

Looks like a copy-paste mistake between Release and Test

  1. πŸš€ RELEASE: IMPERATIVE_MESSAGE_GOES_HERE

    Use when you release a new version.
    E.g. πŸš€ RELEASE: Version 2.0.0

  2. βœ… TEST: IMPERATIVE_MESSAGE_GOES_HERE

    Use when you release a new version. <= Should maybe be 'Use when you update test suite'
    E.g. βœ… TEST: Mock User Login/Logout

[REQUEST] add a WIP commit emoji

It would be good if we can use commit message that symbolize intermediate work of a things.
example: πŸ“˜WIP: (commit message goes here)

Function gimp

In response to our Twitter conversation.

With regards to the function for IMPROVED, as documented in the .bashrc/.zshrc Section:

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

This function name is in conflict with GIMP a cross-platform image editor available for GNU/Linux, OS X, Windows and more operating systems. The CLI command gimp is associated with that application and will honestly be more of a problem on Linux.

For cross platform support, you may want to change the documentation in the README to rename this function. It is true the user can make this change themselves but I wanted to make you aware of the issue.

If you decide to make a change her I will be glad to submit a PR, using Emoji-Log, of course.

Custom Workflow for .gitconfig users

Some developers (like me 😬) separate GIT aliases from the rest of alias in the ~/.zshrc file, I think it would be nice to include an special workflow for~/.gitconfig.

This is may way:

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

# 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"

Fun fact: It took me like an hour to find how to escape quotes πŸ€¦β€β™‚οΈ.

What do you think?
I can create the PR πŸ˜‰πŸ‘.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.