You can now convert your existing branch protection rules to repository rulesets directly from your repository settings. This helps you migrate to GitHub’s more flexible and scalable policy framework without manually recreating each rule.

As we continue investing in rulesets as the foundation for repository governance on GitHub, this tool makes it easy to bring your existing policies forward.

How it works

Navigate to Settings → Branches in your repository, find the classic rule under Branch protection rules, and click Convert to ruleset. GitHub maps your existing branch protection configuration including required reviews, status checks, and push restrictions into equivalent ruleset rules.

Why migrate to rulesets?

Rulesets offer several advantages over classic branch protections:

  • Apply rules across multiple branches with pattern matching.
  • Layer multiple rulesets for granular policy control.
  • Manage rulesets at the organization or enterprise level.
  • Configure fine-grained bypass permissions for users, teams, and apps.

Availability

This feature is available for all repositories where rulesets are available. Learn more about repository rulesets.

Join the discussion within GitHub Community.