I've been accidentally pushing to master too much recently lol, so found a prepush hook online (as I can't seem to ban admins from pushing to protected branches <.<), and while I could've just put it in a local hook, I thought it might be nice for other admins too.
How Has This Been Tested?
N/A (well I tested it manually by running the grep and checking the output and by changing the current_branch variable to harddcoded master and checked that it prompted me)
Screenshots (if appropriate):
N/A
Checklist:
All of this is N/A :)
[x] My code follows the code style of this project. (see the style guide)
[x] My change requires a change to the documentation.
Coverage remained the same at 5.824% when pulling 27eba422d7bc8f3943eb289461130086c76831e1 on emil/warn-on-master-push into 1f3da7354c94b125c596c92b9612a898ac3e8ad6 on master.
Related Issue
N/A
Description
I've been accidentally pushing to master too much recently lol, so found a prepush hook online (as I can't seem to ban admins from pushing to protected branches <.<), and while I could've just put it in a local hook, I thought it might be nice for other admins too.
How Has This Been Tested?
N/A (well I tested it manually by running the grep and checking the output and by changing the current_branch variable to harddcoded master and checked that it prompted me)
Screenshots (if appropriate):
N/A
Checklist:
All of this is N/A :)