Improvement
• 1 minute read

Restrict renaming protected branches to admins

Summary

Now, only admins can rename branches that are protected by branch protection rules. GitHub allows repository collaborators to rename every branch in a repository, with the exception of the default…

Now, only admins can rename branches that are protected by branch protection rules.

GitHub allows repository collaborators to rename every branch in a repository, with the exception of the default branch.
When a collaborator renames a branch, any non-wildcard branch protection rules that apply to that branch are also changed to match the branch's new name.
Because only admins can modify branch protection rules, renaming of a protected branch is now limited to admin users.

For more information, visit Renaming a branch and Managing a branch protection rule.

Back to top