Called prior to a push to a remote. In addition to the parameters, additional information, separated by a space is passed in through stdin in the form of " ". Parsing the input can get you additional information that you can use to check. For instance, if the local sha1 is 40 zeros long, the push is a delete and if the remote sha1 is 40 zeros, it is a new branch. This can be used to do many comparisons of the pushed ref to what is currently there. A non-zero exit status aborts the push.
git push- pre-push - Git pre-push hook to prevent force pushing master branch.
If you have a question, find a bug, or just want to say hi, please open an issue on GitHub.
To the extent possible under law, Islam Temirbek has waived all copyright and related or neighboring rights to this work.