Git pre-push hook not working -


i have placed file inside .git/hooks named pre-push.sh

i not making check, want echo error while pushing remote. below .sh file content

protected_branch='test' echo $protected_branch exit 1 

however still allowing push changes without throwing error. need find making mistake?

as mpif said, name of hook must pre-push (not pre-push.sh, not pre-push.exe, not pre-push.py ...)


Comments