Bird
0
0

Given the following commands run in sequence on a feature branch:

medium📝 Command Output Q13 of 15
Git - Collaboration Workflows
Given the following commands run in sequence on a feature branch:
git add file.txt
git commit -m "Fix typo"
git push origin feature-branch

What happens to the existing pull request linked to feature-branch?
AA new pull request is created
BThe pull request updates automatically with the new commit
CThe pull request is closed
DNothing changes until you merge manually
Step-by-Step Solution
Solution:
  1. Step 1: Push updates to the feature branch

    Pushing commits to the branch linked to the PR updates the PR automatically.
  2. Step 2: PR reflects new commits

    The PR shows the new changes for reviewers to see and re-review.
  3. Final Answer:

    The pull request updates automatically with the new commit -> Option B
  4. Quick Check:

    Push to feature branch updates PR = A [OK]
Quick Trick: Push changes to update existing PR automatically [OK]
Common Mistakes:
  • Thinking a new PR is needed for each update
  • Believing PR closes on push
  • Assuming manual merge needed to update PR

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes