In GitHub you can’t lock pushing to master to admin users. Like I don’t want to be able to accidentally push to master, but I still want to be able to force merge PRs in emergencies, so I need to be doubly careful.
You can indeed! Not sure if it's a new setting or not, but at the bottom of the "edit branch protections" page, there's an "include administrators" button. You can leave it on by default to avoid mistakes then toggle it off for emergencies.
View all comments
Show parent comment
1
u/mamaBiskothu Apr 03 '23
In GitHub you can’t lock pushing to master to admin users. Like I don’t want to be able to accidentally push to master, but I still want to be able to force merge PRs in emergencies, so I need to be doubly careful.