Skip to content

Instantly share code, notes, and snippets.

@xuqingfeng
Created June 3, 2015 02:17
Show Gist options
  • Save xuqingfeng/513c1d6a9f37c6cf0c72 to your computer and use it in GitHub Desktop.
Save xuqingfeng/513c1d6a9f37c6cf0c72 to your computer and use it in GitHub Desktop.
add emoji to git commit message automatically.
function gcme(){
message=$1
message_with_emoji=$message
if [[ $message == *"add"* ]]
then
message_with_emoji="$1 :beer:"
elif [[ $message == *"remove"* ]]
then
message_with_emoji="$1 :mask:"
elif [[ $message == *"fix"* ]]
then
message_with_emoji="$1 :bow:"
elif [[ $message == *"yo"* ]]
then
message_with_emoji="$1 :wink:"
fi
git commit -m $message_with_emoji
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment