Last active
May 10, 2016 11:48
-
-
Save cGuille/2307c9f385e38377e628404178909b9b to your computer and use it in GitHub Desktop.
Git post-commit hook to display the commit message in an enclosing sentence. The goal is to check whether the commit message wording feels right or not.
This file contains hidden or 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
#!/usr/bin/env bash | |
LIGHT_GREEN='\e[1;32m' | |
NO_FORMAT='\e[0m' | |
UNDERLINE='\e[4m' | |
RESET_UNDERLINE='\e[24m' | |
COMMIT_MESSAGE="$(git show -s --format=%s HEAD)" | |
echo -e "${LIGHT_GREEN}When applied, this commit will ${UNDERLINE}${COMMIT_MESSAGE}${RESET_UNDERLINE}.${NO_FORMAT}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment