About converting branch protections to rulesets
Rulesets give you clearer visibility and control over how protections apply to a repository. Unlike branch protection rules, multiple rulesets can apply to the same branch at the same time, and people with read access can view the active rulesets. This helps developers understand the rules that affect them and lets auditors review repository protections without administrator access.
To move your existing protections to this model, convert one branch protection rule at a time in a guided flow. GitHub generates one or more rulesets that preserve the original rule's behavior. You can preview the rulesets and verify the result before you remove the original branch protection rule.
For more information about rulesets, see 규칙 세트에 대한 정보.
Converting a branch protection rule to a ruleset
-
GitHub에서 리포지토리의 기본 페이지로 이동합니다.
-
리포지토리 이름 아래에서 Settings를 클릭합니다. "설정" 탭이 표시되지 않으면 드롭다운 메뉴를 선택한 다음 설정을 클릭합니다.

-
사이드바의 "Code and automation" 섹션에서 Branches를 클릭합니다.
-
Under "Branch protection rules", find the rule you want to convert, then click Convert to ruleset.
-
Set the ruleset name for each ruleset that will be created in this conversion.
-
Review the "New behavior" section to understand what will change when you create the ruleset or rulesets.
-
Optionally, to remove the original branch protection rule as part of the conversion, select Delete branch protection rule once migration is done.
-
Click Create ruleset. If the conversion produces more than one ruleset, the button includes the number of rulesets, for example, Create 2 rulesets.
If you keep the original branch protection rule, it continues to protect matching branches. An Active ruleset is enforced alongside it, so changes must satisfy both.
참고
The conversion covers all branch protection types with the exception of the "Require conversation resolution before merging" setting. In branch protections, this setting exists on its own. In rulesets, conversation resolution is part of the pull request rule and only applies when that rule is enabled. As a result, this setting does not map one to one during conversion. See 규칙 세트에 사용 가능한 규칙.
The new ruleset has an Active status, which means that it is enforced as soon as it is created.
Deleting the original branch protection rule
After you convert a rule, return to the Branches settings page. If you did not opt to delete the branch protection rule during the conversion process and the new ruleset fully covers it, the listed rule displays the message "This rule is fully covered by rulesets and can be safely deleted", and a Delete button appears in place of the Convert to ruleset button.
Before you delete the original rule, we recommend confirming that the new ruleset behaves as you expect. When you are ready, click Delete to remove the branch protection rule.