mediumMultiple ChoiceObjective-mapped
FC0-U71 Practice Question: A team of developers is collaborating on a mobile…
A team of developers is collaborating on a mobile app using Git. One developer, Alice, is working on a new feature in a branch called "new-feature". Bob, another developer, has pushed several bug fixes to the main branch. Alice now wants to incorporate Bob's bug fixes into her feature branch. Which sequence of Git commands should Alice use to achieve this with minimal disruption?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
git checkout new-feature, git merge main, then resolve conflicts if any.
Merging the main branch into the feature branch (git checkout new-feature, git merge main) brings the fixes into Alice's branch. The opposite (merging feature into main) would add unfinished work to main. Rebasing with force push is dangerous. Creating a new branch doesn't bring in fixes.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
git fetch, git rebase new-feature onto origin/main, then force push.
Why it's wrong here
Rebasing rewrites history and force push can disrupt others; it's more advanced and risky.
- ✓
git checkout new-feature, git merge main, then resolve conflicts if any.
Why this is correct
This merges the latest main (with bug fixes) into the feature branch, keeping the work isolated.
- ✗
git checkout -b new-feature, git push.
Why it's wrong here
This creates a new branch from the current branch, not incorporating the fixes.
- ✗
git checkout main, git pull, git merge new-feature, then push.
Why it's wrong here
This merges the feature branch into main, which is premature and could introduce incomplete code.
Go deeper
Related to this question
About these practice questions
One of 988 original FC0-U71 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.