Bird
0
0

You want to fetch updates from multiple remotes named origin and upstream without merging. Which command sequence is correct?

hard📝 Workflow Q9 of 15
Git - Remote Repositories
You want to fetch updates from multiple remotes named origin and upstream without merging. Which command sequence is correct?
Agit fetch origin upstream
Bgit pull origin && git pull upstream
Cgit fetch origin && git fetch upstream
Dgit fetch --all origin upstream
Step-by-Step Solution
Solution:
  1. Step 1: Understand fetch command for multiple remotes

    git fetch accepts one remote at a time; to fetch multiple remotes, run separate commands.

  2. Step 2: Eliminate incorrect options

    git fetch origin upstream is invalid syntax; git pull merges; --all fetches all remotes but does not take remote names.

  3. Final Answer:

    git fetch origin && git fetch upstream -> Option C
  4. Quick Check:

    Fetch multiple remotes with separate commands [OK]
Quick Trick: Fetch multiple remotes by running fetch separately for each [OK]
Common Mistakes:
  • Trying to fetch multiple remotes in one command
  • Using git pull instead of fetch
  • Misusing --all option with remote names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes