Skip to content

Instantly share code, notes, and snippets.

@learn2reid
Forked from coderaaron/gitmoji.sh
Last active May 18, 2020 20:40
Show Gist options
  • Save learn2reid/08cb6fccba71dceaf6b20c41dd58f086 to your computer and use it in GitHub Desktop.
Save learn2reid/08cb6fccba71dceaf6b20c41dd58f086 to your computer and use it in GitHub Desktop.
Use Emoji in Git commits
# shellcheck shell=bash
# shellcheck disable=SC2145
function gcap() {
git commit -m "$*" #&& git push
}
function gcapp() {
git add . && git commit -m "$*" #&& git push
}
# function gcapp() {
# git add . && git commit -m "$*" && git push
# }
#new feature
function gnew() {
gcap "πŸ†• NEW: $@"
}
#Adding
function gadd() {
gcap "βž• ADDING: $@"
}
#Removing
function gremove() {
gcap "βž– REMOVING: $@"
}
#upgrading
function gup() {
gcap "⬆️ UPGRADING: $@"
}
#downgrading
function gdown() {
gcap "⬇️ DOWNGRADING: $@"
}
function gsubmod() {
gcap "πŸ“¦οΈ SUBMODULE: $@"
}
#improvement
function gimpr() {
gcap "↗️ IMPROVEMENT: $@"
}
#important
function gimpt() {
gcap "❗️ IMPORTANT: $@"
}
function gmajor() {
gcap "πŸ’₯ MAJOR CHANGES: $@"
}
#refactoring
function gref() {
gcap "πŸ”€ REFACTOR: $@"
}
function gclogs() {
gcap "πŸ”ŠοΈ Adding Changelog $@"
}
#documentation
function gdoc() {
gcap "πŸ“– DOC: $@"
}
#typo
function gtypo() {
gcap "✏️ TYPO: $@"
}
#release
function grel() {
gcap "πŸš€ RELEASE: $@" && git tag "$@"
}
#contribution
function gthx() {
gcap "πŸ‘ THANKS: $@"
}
#breaking
function gbreak() {
gcap "⚠️ BREAKING: $@"
}
#dead code removal
function gcleanup() {
gcap "♻️ CODE CLEANUP: $@"
}
#tests
function gtest() {
gcap "βœ… TEST: $@"
}
#experimental
function gexp() {
gcap "πŸ™ EXPERIMENTAL: $@"
}
function ghotfix() {
gcap "πŸš‘ Critical hotfix: $@"
}
function gdeploy() {
gcap "πŸš€οΈ DEPLOYMENT: $@"
}
function gmac() {
gcap "🍎 Fixing something on macOS: $@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment