Bird
0
0

What does the git fetch command do in Git?

easy📝 Conceptual Q11 of 15
Git - Remote Repositories
What does the git fetch command do in Git?
AMerges remote changes directly into the current branch
BDeletes local branches that are no longer on the remote
CDownloads changes from the remote repository without merging them
DCreates a new branch from the remote repository
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of git fetch

    git fetch downloads updates from the remote repository but does not change your current working files or branches.
  2. Step 2: Compare with other commands

    Unlike git pull, which fetches and merges, git fetch only downloads data, letting you review changes first.
  3. Final Answer:

    Downloads changes from the remote repository without merging them -> Option C
  4. Quick Check:

    git fetch = download only [OK]
Quick Trick: Fetch only downloads; it never merges automatically [OK]
Common Mistakes:
  • Confusing fetch with pull which merges automatically
  • Thinking fetch deletes branches
  • Assuming fetch creates new branches

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes