I have placed a file inside .git/hooks named pre-push.sh
I am not making any check, just want to echo some error while pushing to the remote. Below is the .sh file content
protected_branch='test' echo $protected_branch exit 1 However it is still allowing to push changes without throwing any error. Need help to find where am i making mistake?