Created
June 3, 2015 02:17
-
-
Save xuqingfeng/513c1d6a9f37c6cf0c72 to your computer and use it in GitHub Desktop.
add emoji to git commit message automatically.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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