Git pre-push hook not working
The name of the hook must be exactly pre-push
(not pre-push.sh
, not pre-push.exe
, not pre-push.py
...)
pre-push.sh
isn't a valid hook name. Instead this needs to be placed on the server as a pre-receive
hook.
I just ran into the same problem and had a proper name for the hook BUT also had to make sure it was executable
chmod 766 .git/hooks/pre-push
fixed it.