Blocking all merges to a branch #22107
-
Hi, I was looking through the branch restrictions for repositories in an organization to see whether it was possible to block merges to a certain branch. Right now, it seems like it’s possible to do one of the following:
For some context, we’re building a small merge queue to manage our growing team and want to ensure all merges go through that (essentially, block pushes and merges from everyone except a GitHub App). Am I missing an option to entirely protect a branch from any changes, or is this not something that’s possible today? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @kylekthompson - welcome to the GitHub Community. You are correct in that it’s not possible to entirely prevent all merges on a specified branch. It’s only possible to restrict the conditions in which a merge can take place using the existing branch protection settings within GitHub. Sorry this isn’t the answer you are looking for! |
Beta Was this translation helpful? Give feedback.
-
No worries, thanks for taking the time to respond! |
Beta Was this translation helpful? Give feedback.
-
This needs to be a feature, somehow. You need to have certain branches that can not be overwritten, except via admin. |
Beta Was this translation helpful? Give feedback.
Hi @kylekthompson - welcome to the GitHub Community.
You are correct in that it’s not possible to entirely prevent all merges on a specified branch.
It’s only possible to restrict the conditions in which a merge can take place using the existing branch protection settings within GitHub.
Sorry this isn’t the answer you are looking for!