Created
November 22, 2013 19:11
-
-
Save jonatasnona/7605213 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
red="\033[1;31m" | |
color_end="\033[0m" | |
# Check unwanted trailing whitespace or space/tab indents; | |
if [[ `git diff --cached --check` ]]; then | |
echo -e ${red}Commit failed${color_end} | |
git diff --cached --check | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment