Bird
0
0

How do you create pull requests so the original repo can review and merge these features independently?

hard📝 Application Q15 of 15
Git - Collaboration Workflows
You forked a project and created two branches: featureA and featureB. You pushed both branches to your fork. How do you create pull requests so the original repo can review and merge these features independently?
ACreate separate pull requests for each branch targeting the original repo's main branch
BCreate one pull request combining both branches
CPush both branches to upstream and wait for automatic merge
DMerge featureB into featureA locally, then create a single pull request
Step-by-Step Solution
Solution:
  1. Step 1: Understand pull request scope

    Each pull request represents changes from one branch to the original repo, allowing independent review.
  2. Step 2: Apply to multiple branches

    To keep features separate, create one pull request per branch targeting the original repo's main branch.
  3. Final Answer:

    Create separate pull requests for each branch targeting the original repo's main branch -> Option A
  4. Quick Check:

    One pull request per branch for independent review [OK]
Quick Trick: Make one pull request per branch for clear reviews [OK]
Common Mistakes:
  • Combining branches in one pull request
  • Pushing branches directly to upstream without PR
  • Merging branches locally before PR

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes