Bird
0
0

After running git fetch origin, what happens to your local branches?

easy📝 Conceptual Q2 of 15
Git - Remote Repositories
After running git fetch origin, what happens to your local branches?
AThey automatically update to match the remote
BThey remain unchanged until you merge or rebase
CThey get deleted if not present on remote
DThey switch to the remote branch automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand fetch effect on local branches

    git fetch updates remote tracking branches but does not change local branches.

  2. Step 2: Local branches stay as they are

    Local branches remain unchanged until you explicitly merge or rebase.

  3. Final Answer:

    They remain unchanged until you merge or rebase -> Option B
  4. Quick Check:

    Fetch does not alter local branches [OK]
Quick Trick: Fetch updates remote info but leaves your branches alone [OK]
Common Mistakes:
  • Assuming fetch updates local branches automatically
  • Thinking fetch deletes local branches
  • Believing fetch switches branches

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes