Checks the commit using the pre-commit git hook for the existence of certain words and stops the commit if they are found
Clone or download
Latest commit 78b5dcb Sep 7, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Added license file Nov 13, 2011
README.rst Update README.rst Sep 7, 2015
pre-commit Added hook file Nov 13, 2011


GIT - Pre-Commit check for certain words

Author:Nikolaos Dimopoulos <>
Thanks to:Remigijus Jarmalavicius <remigijus(at)>


GIT pre-commit hook for checking the existence of certain words/phrases/functions in the code to be committed.

How to install

To install hook, copy pre-commit file to your project .git/hooks/pre-commit:

$ cp pre-commit .git/hooks/pre-commit;

$ chmod +x .git/hooks/pre-commit;

The hook comes with the "die", "print_r" and "var_dump" functions as the strings to be checked prior to the commit. You can add more strings to be checked if you wish by modifying the checks array


For any bugs, please visit: