-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature for protection against pushing to remote main/master #3716
Comments
Is that really |
I can do a bit more research and try to repro on a fresh git repo, but I'm pretty sure that the cli |
Apologies for the miscommunication. It turns out that this didn't apply because I was an admin of the repo and github (for whatever reason) lets admins bypass branch protections by default, unless this flag is checked. So there's no issue on lazygit's end! However I'd still like to echo the feature request of adding (maybe an optional config you can set?) a confirmation message before pushing. |
If you forget to switch branch from master/main and press the key P or perhaps you meant to press p (for pulling) you could in theory do something that could have a big consequence if you work against a repo that are used for CD/gitops/configuration management. Sure! Those repos should definitely have branch protection in place anyway to disable force pushing, only merge commits thru PR/branches etc, but lets think worst case scenario and say someone forgets to enable them or they are temporarily disabled.
What about optional protection feature that will give you a big warning you if you try to push against remote master/main branches?
The text was updated successfully, but these errors were encountered: