I placed a file inside .git / hooks named pre-push.sh
I do not do any checks, I just want to repeat the error when I press the remote control. Below is the contents of the .sh file
protected_branch='test'
echo $protected_branch
exit 1
However, it still allows you to push changes without any error. Need help finding where I am making a mistake?
source
share