Created
May 19, 2011 17:05
-
-
Save re5et/981235 to your computer and use it in GitHub Desktop.
git pre-commit hook to keep console.log out of commited code.
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
#!/bin/sh | |
has_console_log=$(git diff --cached | fgrep 'console.log') | |
if [ "$has_console_log" != "" ] | |
then | |
echo "ERROR: You have console.log in your commit. Remove them." | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment