Updates to protected branches
Automatically enforce protected branch settings across multiple branches in your repository.
![](https://github.blog/wp-content/uploads/2018/08/26907143-177e1fc0-4ba6-11e7-9bcb-1bdd60bfe66d.jpg?resize=1200%2C630)
Protected branches make sure the right reviews happen, support passing CI, and prevent force pushes. With our latest update, you can automatically enforce protected branch settings across multiple branches in your repository.
If you’re a repository owner or have admin permissions in a repository, you can now customize branch protections and enforce certain workflows, such as requiring more than one pull request review or requiring certain status checks to pass before allowing a pull request to merge.
Branch protection rules
Branch protection rules build on our existing branch protection functionality. Instead of setting up individual protections for multiple branches, you can share the same set of protections across different branches matching the same naming pattern.
Branch protection rule patterns are based on fnmatch syntax. You could use releases/v?.?
to automatically protect branches like releases/v1.0
, releases/v2.0
, and releases/v2.1
. And [1-9]-[0-9]-stable
could automatically protect branches like 1-0-stable
, 2-0-stable
, and 2-1-stable
.
View more fnmatch documentation or learn more about configuring protected branches.
Written by
Related posts
![](https://github.blog/wp-content/uploads/2023/09/screencapture-innovationgraph-github-2023-09-20-15_44_54-1.png?resize=400%2C212)
How researchers are using GitHub Innovation Graph data to estimate the impact of ChatGPT
An interview with economic researchers who are applying causal inference techniques to analyze the effect of generative AI tools on software development activity.
![](https://github.blog/wp-content/uploads/2024/01/Enterprise-DarkMode-1.png?resize=400%2C212)
GitHub Availability Report: June 2024
In June, we experienced two incidents that resulted in degraded performance across GitHub services.
![](https://github.blog/wp-content/uploads/2024/06/AI-DarkMode-4.png?resize=400%2C212)
Advancing responsible practices for open source AI
Outcomes from the Partnership on AI and GitHub workshop.