Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmadawais/Emoji-Log
Emoji-Log โ An Emoji Git commit log messages spec. [ ๐ฆ๐๐๐๐๐ค โผ๏ธ]
https://github.com/ahmadawais/Emoji-Log
alfred-snippets emoji emoji-log emoji-meaning git vscode workflow
Last synced: about 2 months ago
JSON representation
Emoji-Log โ An Emoji Git commit log messages spec. [ ๐ฆ๐๐๐๐๐ค โผ๏ธ]
- Host: GitHub
- URL: https://github.com/ahmadawais/Emoji-Log
- Owner: ahmadawais
- License: mit
- Created: 2018-05-05T14:34:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-09T10:41:20.000Z (over 1 year ago)
- Last Synced: 2024-10-19T07:54:24.653Z (about 2 months ago)
- Topics: alfred-snippets, emoji, emoji-log, emoji-meaning, git, vscode, workflow
- Language: JavaScript
- Homepage:
- Size: 504 KB
- Stars: 899
- Watchers: 17
- Forks: 71
- Open Issues: 10
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Funding: .github/FUNDING.yml
- License: license.md
- Code of conduct: code-of-conduct.md
Awesome Lists containing this project
- awesome-list - Emoji-Log - Log โ An Emoji Git commit log messages spec standard. [ ๐ฆ๐๐๐๐๐ค โผ๏ธ] | ahmadawais | 667 | (JavaScript)
- stars - Emoji-Log - Log โ An Emoji Git commit log messages spec. [ ๐ฆ๐๐๐๐๐ค โผ๏ธ] | ahmadawais | 903 | (JavaScript)
- stars - Emoji-Log - Log โ An Emoji Git commit log messages spec. [ ๐ฆ๐๐๐๐๐ค โผ๏ธ] | ahmadawais | 903 | (JavaScript)
README
`EMOJI-LOG`
After building [hundreds of open source software](https://github.com/ahmadawais) 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](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/non-flat-round.svg)](./../../)
![Philosophy](https://user-images.githubusercontent.com/960133/120058283-3ea18480-c063-11eb-8a62-8146227093fa.png)
### 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](https://gitmoji.carloscuesta.me/) 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`.
1. **RULES** โ
- A small number of categories โ easy to memorize.
- Nothing more nothing less.
- E.g. `๐ฆ NEW`, `๐ IMPROVE`, `๐ FIX`, `๐ DOC`, `๐ RELEASE`, `๐ค TEST`, and `โผ๏ธ BREAKING`
1. **ACTIONS** โ
- Make git commits based on the actions you take.
- Use a good editor like [VSCode](https://code.visualstudio.com/) to commit the right files with commit messages.
![Start](https://user-images.githubusercontent.com/960133/120058297-4c570a00-c063-11eb-8458-0f61cf621169.png)
### 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`1. `๐ IMPROVE: IMPERATIVE_MESSAGE_GOES_HERE`
> Use when you improve/enhance piece of code like refactoring etc.
> E.g. `๐ IMPROVE: Remote IP API Function`1. `๐ FIX: IMPERATIVE_MESSAGE_GOES_HERE`
> Use when you fix a bug โ need I say more?
> E.g. `๐ FIX: Case conversion`1. `๐ DOC: IMPERATIVE_MESSAGE_GOES_HERE`
> Use when you add documentation like `README.md`, or even inline docs.
> E.g. `๐ DOC: API Interface Tutorial`1. `๐ RELEASE: IMPERATIVE_MESSAGE_GOES_HERE`
> Use when you release a new version.
> E.g. `๐ RELEASE: Version 2.0.0`1. `๐ค TEST: IMPERATIVE_MESSAGE_GOES_HERE`
> Use when it's related to testing.
> E.g. `๐ค TEST: Mock User Login/Logout`1. `โผ๏ธ 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](https://user-images.githubusercontent.com/960133/120058303-5547db80-c063-11eb-87ae-17f758a4e43b.png)
#### 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](https://marketplace.visualstudio.com/items?itemName=ahmadawais.emoji-log-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.
```sh
#.# 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:
```sh
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:
```sh
# 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](https://user-images.githubusercontent.com/960133/120058311-61339d80-c063-11eb-9853-da0905b7c288.png)
### USING `EMOJI-LOG`
Here's a list of repos that make use of Emoji-Log.
- [Create-Guten-Block Toolkit โ](https://github.com/ahmadawais/create-guten-block/commits/)
- [VSCode Shades of Purple Theme โ](https://github.com/ahmadawais/shades-of-purple-vscode/commits/)
- [Ahmad Awais GitHub Repos โ](https://github.com/ahmadawais) โ _Latest repos on this account._
- [CaptainCore CLI (WordPress Management Toolkit) โ](https://github.com/CaptainCore/captaincore-cli/commits/)
- [CaptainCore GUI (WordPress plugin) โ](https://github.com/CaptainCore/captaincore-gui/commits/)
- **You?!** Add your repo to the list after adding the Emoji-log badge to your readme.
![AlfredSnippets](https://user-images.githubusercontent.com/960133/120058316-685aab80-c063-11eb-8bfd-cb0d4b3e34c2.png)
### Alfred Snippets
[Alfred](https://www.alfredapp.com/) [PowerPack](https://www.alfredapp.com/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`](Emoji-Log.alfredsnippets), deselecting "Strip snippets of 'auto expand' flag" when promptedThis 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`](Emoji-Log.textexpander) to import.
![badge](https://user-images.githubusercontent.com/960133/120058320-6ee92300-c063-11eb-834c-20463fdfb0dd.png)
### `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](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat.svg)
- **STYLE**: Flat Square
- **MARKDOWN** โ```markdown
[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat.svg)](https://github.com/ahmadawais/Emoji-Log/)
```- **HTML** โ
![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat-round.svg)
- **STYLE**: Flat Rounded
- **MARKDOWN** โ```markdown
[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/flat-round.svg)](https://github.com/ahmadawais/Emoji-Log/)
```- **HTML** โ
![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/non-flat-round.svg)
- **STYLE**: Non-flat Rounded
- **MARKDOWN** โ```markdown
[![emoji-log](https://cdn.rawgit.com/ahmadawais/stuff/ca97874/emoji-log/non-flat-round.svg)](https://github.com/ahmadawais/Emoji-Log/)
```- **HTML** โ
[![๐](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/sponsor.png)](./../../)
## Sponsor
Me ([Ahmad Awais](https://twitter.com/mrahmadawais/)) and my incredible wife ([Maedah Batool](https://twitter.com/MaedahBatool/)) are two engineers who fell in love with open source and then with each other. You can read more [about me here](https://ahmadawais.com/about). 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.
- ๐ **$9.99/month (recommended)** โฏ [Two cups of Caffรจ latte (coffee) every month โ](https://pay.paddle.com/checkout/540217)
- ๐ **$99.99 (one-time sponsor)** โฏ [Support an hour of open-source code โ](https://pay.paddle.com/checkout/515568)
- ๐ฐ **$49.99 (one-time sponsor)** โฏ [Support an hour of maintenance โ](https://pay.paddle.com/checkout/527253)
- โ๏ธ **$9.99 (one-time sponsor)** โฏ [Lunch/coffee โ](https://pay.paddle.com/checkout/527254)
[![๐](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/license.png)](./../../)
## License & Conduct
- MIT ยฉ [Ahmad Awais](https://twitter.com/MrAhmadAwais/)
- [Code of Conduct](code-of-conduct.md)
- [Munawar](https://munwr.com/) for making awesome badges
[![๐](https://raw.githubusercontent.com/ahmadawais/stuff/master/images/git/connect.png)](./../../)
## Connect