Bird
0
0

You want to ensure that a pull request cannot be merged until it has at least two approvals. Which Git hosting feature should you configure?

hard📝 Workflow Q8 of 15
Git - Collaboration Workflows
You want to ensure that a pull request cannot be merged until it has at least two approvals. Which Git hosting feature should you configure?
AForce push restrictions
BBranch protection rules with required reviews
CTagging commits
DGit hooks on local machines
Step-by-Step Solution
Solution:
  1. Step 1: Identify feature to enforce review approvals

    Branch protection rules allow setting required number of approvals before merging.
  2. Step 2: Exclude unrelated features

    Force push restrictions prevent overwriting history, tagging is for marking commits, and git hooks run locally.
  3. Final Answer:

    Branch protection rules with required reviews -> Option B
  4. Quick Check:

    Require approvals via branch protection [OK]
Quick Trick: Use branch protection to require reviews [OK]
Common Mistakes:
  • Confusing force push with review rules
  • Thinking tags enforce approvals
  • Using local git hooks for PR rules

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes