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

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -