GH-100 · Question #7
What is the potential consequence of enabling multiple rulesets that apply to the same branch in a repository?
The correct answer is B. All applicable rulesets will be evaluated, and their combined rules enforced. When multiple rulesets target the same branch, GitHub evaluates all of them and enforces the union of their rules - meaning a branch must satisfy every applicable ruleset simultaneously, not just one. This is by design to allow layered governance (e.g., org-wide security rules…
Question
What is the potential consequence of enabling multiple rulesets that apply to the same branch in a repository?
Options
- AOnly organization-level rulesets are enforced over repository-level ones
- BAll applicable rulesets will be evaluated, and their combined rules enforced
- COnly the most recently created ruleset will be enforced
- DRulesets will override each other, leading to unpredictable behavior
How the community answered
(33 responses)- A3% (1)
- B94% (31)
- C3% (1)
Explanation
When multiple rulesets target the same branch, GitHub evaluates all of them and enforces the union of their rules - meaning a branch must satisfy every applicable ruleset simultaneously, not just one. This is by design to allow layered governance (e.g., org-wide security rules combined with repo-specific workflow rules).
- A is wrong because organization-level rulesets do not automatically override repository-level ones; both are enforced together.
- C is wrong because creation order is irrelevant - there is no "last ruleset wins" logic.
- D is wrong because the behavior is entirely predictable: all rules stack additively, with no silent overriding.
Memory tip: Think of rulesets like security checkpoints at an airport - a traveler (your commit) must pass every checkpoint in sequence, not just one. More checkpoints = stricter combined requirements, never a replacement.
Topics
Community Discussion
No community discussion yet for this question.