Learn vocabulary for GitHub repository governance: branch protection rules, CODEOWNERS, required reviewers, merge strategies, and protected branches.
0 / 25 completed
1 / 25
What are 'branch protection rules' on GitHub?
Branch protection rules are configured in repository settings and apply to specific branches (e.g., main). Common rules include: require pull request reviews, require status checks to pass, prevent force pushes, and require linear history.
2 / 25
What is the CODEOWNERS file in a GitHub repository?
The CODEOWNERS file (placed in the root, docs/, or .github/ directory) uses pattern matching to map file paths to owners. When a PR touches a file owned by a team or user, they are automatically added as required reviewers.
3 / 25
What does 'this needs two approvals' mean in a GitHub workflow?
Branch protection rules can specify a minimum required number of approving reviews. 'This needs two approvals' means the team has configured the protected branch to require at least two distinct LGTM/approval reviews before the PR can be merged.
4 / 25
What is a 'squash merge' strategy, and when is it preferred?
Squash merge collapses all commits on the feature branch into one commit on the target branch. This keeps the main branch history clean and readable, trading off individual commit granularity for a linear, summarised history.
5 / 25
What is a 'protected branch' and how does it differ from a regular branch?
Protected branches enforce governance policies. The main or production branch is typically protected to ensure every change goes through review and CI. Without protection, any collaborator with write access could push directly, bypassing quality controls.
6 / 25
During a code review for the `payment_processing` module, Sarah flagged a recent commit by David. The reviewer's comment read: 'This branch is nearing its full size; consider using feature branches to isolate changes and prevent large merge conflicts.' Which of the following best describes David's action in this scenario?
A) He was utilizing a 'hotfix' branch to rapidly deploy critical security updates.
B) He was employing a standard development workflow, potentially leading to merge conflicts if not managed carefully.
C) He was adhering to best practices for repository governance by using feature branches and minimizing the size of his main branch.
D) He was attempting to directly modify the `main` branch, bypassing established branching strategies.
David's comment highlights the importance of managing branch size and preventing merge conflicts. Using feature branches allows developers to isolate changes in smaller, independent units, reducing the risk of large-scale conflicts when merging back into the main branch. Option B is partially correct but doesn't fully capture the proactive governance aspect being discussed; options A and D are incorrect because they describe specific scenarios unrelated to general repository management.
7 / 25
During a code review of the `user_authentication` module, Alex commented in the PR description: 'To maintain stability and prevent accidental regressions, we should enforce that all changes to this core functionality require approval from both John and myself before merging back into the `main` branch. This helps ensure thorough testing and reduces the risk of introducing vulnerabilities.' Which of the following best describes Alex's suggestion?
Alex is advocating for branch protection rules – specifically, requiring multiple approvals before merges. This practice significantly enhances repository governance by limiting who can directly modify critical branches like `main`, reducing the chance of introducing errors or security issues. The other options represent alternative approaches to development and deployment that don't directly address the core issue of controlling access and preventing regressions within a central repository.
8 / 25
During a discussion about the `api_gateway` repository with the team, Maria raised concerns. 'We need to ensure that no one can directly push changes to the `production` branch. It's critical for our security and stability – we want a controlled process.' Which of the following best describes Maria's suggestion in terms of repository governance? Maria is advocating for measures to limit direct access and control code deployments
Maria's comment highlights the importance of controlling access to critical branches like `production`. Branch protection rules allow administrators to restrict direct pushes, require pull requests with code reviews, and enforce additional checks – preventing accidental or malicious changes from reaching a live environment. This is a core element of repository governance, ensuring stability and security.
9 / 25
During a code review of the `reporting` module, Ben left a comment on a PR submitted by Emily: 'To maintain consistency and prevent accidental breaking changes to our reporting pipelines, we should implement branch protection rules that restrict direct commits to the `main` branch.' Which of the following best describes the purpose of Ben's suggestion within the context of repository governance?
Ben's comment highlights the importance of branch protection rules – a key element of repository governance. These rules restrict direct commits to critical branches like `main`, preventing accidental or unintended changes that could destabilize the system. By limiting direct access, developers can maintain consistency and reduce the risk of introducing regressions through uncontrolled modifications. The correct answer reflects this core principle of controlled development.
10 / 25
During a sprint planning meeting for the `inventory_management` project, Liam proposed a new repository governance strategy. He stated: 'We need to ensure that no one can directly push code changes to the `release` branch. We'll use branch protection rules to require at least two approvals before merging any commits.' Considering this scenario, what is the *primary* benefit of implementing this approach from a repository governance perspective?
Liam's suggestion – requiring multiple approvals before merging into the `release` branch – establishes a crucial safety net. Branch protection rules with approval gates dramatically reduce the risk of introducing bugs or breaking changes into production by enforcing thorough review and testing. Option A is incorrect because it describes the opposite effect; Options C and D are irrelevant to the core governance benefit of controlled deployment.
11 / 25
During a code review for the `payment_processing` module, Sarah flagged a recent commit by David. The reviewer's comment read: 'This branch is nearing its full size; consider using feature branches to isolate changes and prevent large merge conflicts.' Which of the following best describes David's action in this scenario?
A) He was utilizing a 'hotfix' branch to rapidly deploy critical security updates.
B) He was employing a standard development workflow, potentially leading to merge conflicts if not managed carefully.
C) He was adhering to best practices for repository governance by using feature branches and minimizing the size of his main branch.
D) He was attempting to directly modify the `main` branch, bypassing established branching strategies.
David's comment highlights the importance of managing branch size and preventing merge conflicts. Using feature branches allows developers to isolate changes in smaller, independent units, reducing the risk of large-scale conflicts when merging back into the main branch. Option B is partially correct but doesn't fully capture the proactive governance aspect being discussed; options A and D are incorrect because they describe specific scenarios unrelated to general repository management.
12 / 25
During a code review of the `user_authentication` module, Alex commented in the PR description: 'To maintain stability and prevent accidental regressions, we should enforce that all changes to this core functionality require approval from both John and myself before merging back into the `main` branch. This helps ensure thorough testing and reduces the risk of introducing vulnerabilities.' Which of the following best describes Alex's suggestion?
Alex is advocating for branch protection rules – specifically, requiring multiple approvals before merges. This practice significantly enhances repository governance by limiting who can directly modify critical branches like `main`, reducing the chance of introducing errors or security issues. The other options represent alternative approaches to development and deployment that don't directly address the core issue of controlling access and preventing regressions within a central repository.
13 / 25
During a discussion about the `api_gateway` repository with the team, Maria raised concerns. 'We need to ensure that no one can directly push changes to the `production` branch. It's critical for our security and stability – we want a controlled process.' Which of the following best describes Maria's suggestion in terms of repository governance? Maria is advocating for measures to limit direct access and control code deployments
Maria's comment highlights the importance of controlling access to critical branches like `production`. Branch protection rules allow administrators to restrict direct pushes, require pull requests with code reviews, and enforce additional checks – preventing accidental or malicious changes from reaching a live environment. This is a core element of repository governance, ensuring stability and security.
14 / 25
During a code review of the `reporting` module, Ben left a comment on a PR submitted by Emily: 'To maintain consistency and prevent accidental breaking changes to our reporting pipelines, we should implement branch protection rules that restrict direct commits to the `main` branch.' Which of the following best describes the purpose of Ben's suggestion within the context of repository governance?
Ben's comment highlights the importance of branch protection rules – a key element of repository governance. These rules restrict direct commits to critical branches like `main`, preventing accidental or unintended changes that could destabilize the system. By limiting direct access, developers can maintain consistency and reduce the risk of introducing regressions through uncontrolled modifications. The correct answer reflects this core principle of controlled development.
15 / 25
During a sprint planning meeting for the `inventory_management` project, Liam proposed a new repository governance strategy. He stated: 'We need to ensure that no one can directly push code changes to the `release` branch. We'll use branch protection rules to require at least two approvals before merging any commits.' Considering this scenario, what is the *primary* benefit of implementing this approach from a repository governance perspective?
Liam's suggestion – requiring multiple approvals before merging into the `release` branch – establishes a crucial safety net. Branch protection rules with approval gates dramatically reduce the risk of introducing bugs or breaking changes into production by enforcing thorough review and testing. Option A is incorrect because it describes the opposite effect; Options C and D are irrelevant to the core governance benefit of controlled deployment.
16 / 25
During a code review for the `payment_processing` module, Sarah flagged a recent commit by David. The reviewer's comment read: 'This branch is nearing its full size; consider using feature branches to isolate changes and prevent large merge conflicts.' Which of the following best describes David's action in this scenario?
A) He was utilizing a 'hotfix' branch to rapidly deploy critical security updates.
B) He was employing a standard development workflow, potentially leading to merge conflicts if not managed carefully.
C) He was adhering to best practices for repository governance by using feature branches and minimizing the size of his main branch.
D) He was attempting to directly modify the `main` branch, bypassing established branching strategies.
David's comment highlights the importance of managing branch size and preventing merge conflicts. Using feature branches allows developers to isolate changes in smaller, independent units, reducing the risk of large-scale conflicts when merging back into the main branch. Option B is partially correct but doesn't fully capture the proactive governance aspect being discussed; options A and D are incorrect because they describe specific scenarios unrelated to general repository management.
17 / 25
During a code review of the `user_authentication` module, Alex commented in the PR description: 'To maintain stability and prevent accidental regressions, we should enforce that all changes to this core functionality require approval from both John and myself before merging back into the `main` branch. This helps ensure thorough testing and reduces the risk of introducing vulnerabilities.' Which of the following best describes Alex's suggestion?
Alex is advocating for branch protection rules – specifically, requiring multiple approvals before merges. This practice significantly enhances repository governance by limiting who can directly modify critical branches like `main`, reducing the chance of introducing errors or security issues. The other options represent alternative approaches to development and deployment that don't directly address the core issue of controlling access and preventing regressions within a central repository.
18 / 25
During a discussion about the `api_gateway` repository with the team, Maria raised concerns. 'We need to ensure that no one can directly push changes to the `production` branch. It's critical for our security and stability – we want a controlled process.' Which of the following best describes Maria's suggestion in terms of repository governance? Maria is advocating for measures to limit direct access and control code deployments
Maria's comment highlights the importance of controlling access to critical branches like `production`. Branch protection rules allow administrators to restrict direct pushes, require pull requests with code reviews, and enforce additional checks – preventing accidental or malicious changes from reaching a live environment. This is a core element of repository governance, ensuring stability and security.
19 / 25
During a code review of the `reporting` module, Ben left a comment on a PR submitted by Emily: 'To maintain consistency and prevent accidental breaking changes to our reporting pipelines, we should implement branch protection rules that restrict direct commits to the `main` branch.' Which of the following best describes the purpose of Ben's suggestion within the context of repository governance?
Ben's comment highlights the importance of branch protection rules – a key element of repository governance. These rules restrict direct commits to critical branches like `main`, preventing accidental or unintended changes that could destabilize the system. By limiting direct access, developers can maintain consistency and reduce the risk of introducing regressions through uncontrolled modifications. The correct answer reflects this core principle of controlled development.
20 / 25
During a sprint planning meeting for the `inventory_management` project, Liam proposed a new repository governance strategy. He stated: 'We need to ensure that no one can directly push code changes to the `release` branch. We'll use branch protection rules to require at least two approvals before merging any commits.' Considering this scenario, what is the *primary* benefit of implementing this approach from a repository governance perspective?
Liam's suggestion – requiring multiple approvals before merging into the `release` branch – establishes a crucial safety net. Branch protection rules with approval gates dramatically reduce the risk of introducing bugs or breaking changes into production by enforcing thorough review and testing. Option A is incorrect because it describes the opposite effect; Options C and D are irrelevant to the core governance benefit of controlled deployment.
21 / 25
During a code review for the `payment_processing` module, Sarah flagged a recent commit by David. The reviewer's comment read: 'This branch is nearing its full size; consider using feature branches to isolate changes and prevent large merge conflicts.' Which of the following best describes David's action in this scenario?
A) He was utilizing a 'hotfix' branch to rapidly deploy critical security updates.
B) He was employing a standard development workflow, potentially leading to merge conflicts if not managed carefully.
C) He was adhering to best practices for repository governance by using feature branches and minimizing the size of his main branch.
D) He was attempting to directly modify the `main` branch, bypassing established branching strategies.
David's comment highlights the importance of managing branch size and preventing merge conflicts. Using feature branches allows developers to isolate changes in smaller, independent units, reducing the risk of large-scale conflicts when merging back into the main branch. Option B is partially correct but doesn't fully capture the proactive governance aspect being discussed; options A and D are incorrect because they describe specific scenarios unrelated to general repository management.
22 / 25
During a code review of the `user_authentication` module, Alex commented in the PR description: 'To maintain stability and prevent accidental regressions, we should enforce that all changes to this core functionality require approval from both John and myself before merging back into the `main` branch. This helps ensure thorough testing and reduces the risk of introducing vulnerabilities.' Which of the following best describes Alex's suggestion?
Alex is advocating for branch protection rules – specifically, requiring multiple approvals before merges. This practice significantly enhances repository governance by limiting who can directly modify critical branches like `main`, reducing the chance of introducing errors or security issues. The other options represent alternative approaches to development and deployment that don't directly address the core issue of controlling access and preventing regressions within a central repository.
23 / 25
During a discussion about the `api_gateway` repository with the team, Maria raised concerns. 'We need to ensure that no one can directly push changes to the `production` branch. It's critical for our security and stability – we want a controlled process.' Which of the following best describes Maria's suggestion in terms of repository governance? Maria is advocating for measures to limit direct access and control code deployments
Maria's comment highlights the importance of controlling access to critical branches like `production`. Branch protection rules allow administrators to restrict direct pushes, require pull requests with code reviews, and enforce additional checks – preventing accidental or malicious changes from reaching a live environment. This is a core element of repository governance, ensuring stability and security.
24 / 25
During a code review of the `reporting` module, Ben left a comment on a PR submitted by Emily: 'To maintain consistency and prevent accidental breaking changes to our reporting pipelines, we should implement branch protection rules that restrict direct commits to the `main` branch.' Which of the following best describes the purpose of Ben's suggestion within the context of repository governance?
Ben's comment highlights the importance of branch protection rules – a key element of repository governance. These rules restrict direct commits to critical branches like `main`, preventing accidental or unintended changes that could destabilize the system. By limiting direct access, developers can maintain consistency and reduce the risk of introducing regressions through uncontrolled modifications. The correct answer reflects this core principle of controlled development.
25 / 25
During a sprint planning meeting for the `inventory_management` project, Liam proposed a new repository governance strategy. He stated: 'We need to ensure that no one can directly push code changes to the `release` branch. We'll use branch protection rules to require at least two approvals before merging any commits.' Considering this scenario, what is the *primary* benefit of implementing this approach from a repository governance perspective?
Liam's suggestion – requiring multiple approvals before merging into the `release` branch – establishes a crucial safety net. Branch protection rules with approval gates dramatically reduce the risk of introducing bugs or breaking changes into production by enforcing thorough review and testing. Option A is incorrect because it describes the opposite effect; Options C and D are irrelevant to the core governance benefit of controlled deployment.
What will I practise in "Repository Governance — Vocabulary"?
Learn vocabulary for GitHub repository governance: branch protection rules, CODEOWNERS, required reviewers, merge strategies, and protected branches.
How many exercises are in this module?
This module has 25 multiple-choice exercises, each with instant feedback and a full explanation of the correct answer.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
Do I need to create an account to do these exercises?
No account is required. Just click an option to answer — your score for this session is tracked automatically in the progress bar above.
What happens if I choose the wrong answer?
You'll immediately see which answer was correct, plus a full explanation covering the vocabulary and reasoning behind it — mistakes are where most of the learning happens.
Can I retry the exercises if I want a higher score?
Yes — use the "Try again" button on the results screen to reset and go through all the questions again.
Is my progress saved if I close the page?
No. Progress is tracked only for your current visit; reloading or leaving the page resets the counter. This keeps the exercise simple and account-free.
Where can I find more GitHub Platform Language exercises?
Browse the full GitHub Platform Language hub for related drills, or check the "Next up" link below to continue with a connected topic.
How is this different from reading an article on the same topic?
Articles explain vocabulary and concepts in prose; this exercise tests and reinforces that vocabulary through active recall with immediate feedback — the two work best together.
Who writes these exercises?
Every exercise is written by the CoderSlingo team, drawing on real workplace English used in IT roles, then reviewed for accuracy and clarity.