The following prevents the commit from completing, and returns code 1
. Put this on the repository's .git/hooks/pre-commit
(or add it if it already exists), then make it executable chmod +x .git/hooks/pre-commit