Created
September 3, 2013 15:31
-
-
Save visor/6425487 to your computer and use it in GitHub Desktop.
Revisions
-
visor created this gist
Sep 3, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ #!/usr/bin/bash FORBIDDEN='var_export\|error_log\|console\.log' git diff --cached --name-only \ | grep -E '\.(js|php|css)$' \ | GREP_COLOR='4;5;37;41' xargs grep --color --with-filename -n -e $FORBIDDEN \ && echo "COMMIT REJECTED Found forbidden references. Please remove them before commiting" \ && exit 1