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

Popular posts from this blog

java - Incorrect order of records in M-M relationship in hibernate -

ruby - Net::HTTP extremely slow responses for HTTPS requests -

c++ - Boost Spirit Parser with a vector of three strings compiling into a struct, adapt not working -