Challenge - 5 Problems
Git Fetch Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediateWhat is the output of
git fetch origin?You run
git fetch origin in your local repository. What happens?Git
git fetch originAttempts:
2 left
💡 Hint
Think about whether your current branch changes after fetching.
✗ Incorrect
git fetch downloads commits from the remote but does not merge them. Your current branch stays the same until you merge manually.
🧠 Conceptual
intermediateWhich command downloads remote changes without merging?
You want to update your local repository with remote changes but keep your current branch unchanged. Which command should you use?
Attempts:
2 left
💡 Hint
One command downloads only, another downloads and merges.
✗ Incorrect
git fetch downloads remote changes without merging. git pull downloads and merges.
🔀 Workflow
advancedWhat is the correct workflow to update your local branch after
git fetch?After running
git fetch origin, how do you update your current branch with the remote changes?Attempts:
2 left
💡 Hint
After fetching, merging is a separate step.
✗ Incorrect
git fetch downloads changes. To update your branch, you merge the fetched remote branch into your current branch.
❓ Troubleshoot
advancedWhy does
git fetch not change my files?You ran
git fetch origin but your files did not change. Why?Attempts:
2 left
💡 Hint
Think about what
git fetch does to your working directory.✗ Incorrect
git fetch downloads remote commits but does not change your working files or current branch until you merge or checkout.
✅ Best Practice
expertWhat is the safest way to review remote changes before merging?
You want to see what changed on the remote before merging into your branch. Which sequence is best?
Attempts:
2 left
💡 Hint
Fetching first lets you see changes safely.
✗ Incorrect
Fetching downloads remote changes without affecting your branch. Using git diff lets you review changes before merging.
