200-901 Software Development and Design Practice Question
A developer is using Git to contribute to a shared repository. After making several commits on a local feature branch, the developer wants to integrate the latest changes from the remote main branch into the feature branch while keeping a linear history. Which Git command should be used?
⚠ Common exam trap
A common mix-up: candidates confuse merge and rebase: merge preserves branch topology but adds a merge commit, while rebase rewrites commits to achieve a linear sequence.
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 rebase main
To integrate upstream changes while keeping a linear history, the feature branch commits must be replayed on top of the updated main. git rebase main performs exactly this operation, moving the branch pointer and rewriting commits so that the history appears as if the feature was developed after the latest main. Merging or pulling would create a merge commit, and cherry-pick does not apply the full set of changes.
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 rebase main
Why this is correct
git rebase main replays the commits from the current feature branch on top of the latest main, resulting in a linear history without a merge commit. This is the standard way to incorporate upstream changes while keeping a clean, linear commit sequence. It rewrites the feature branch commits, which is acceptable for local branches that have not been shared.
- ✗
git merge main
Why it's wrong here
git merge main integrates changes from main into the current branch but creates a merge commit, which introduces a non-linear history. While it preserves the branch topology, it does not maintain the linear history the developer wants. This command is suitable when a merge commit is acceptable, but it does not meet the stated requirement of linear history.
- ✗
git pull origin main
Why it's wrong here
git pull origin main fetches and merges the remote main into the current branch, which by default creates a merge commit and thus a non-linear history. It also operates on the remote-tracking branch, not the local main, and does not provide the linear history the developer seeks. This command is more appropriate for updating a local branch from its remote counterpart without rebasing.
- ✗
git cherry-pick main
Why it's wrong here
git cherry-pick main attempts to apply the commit pointed to by main onto the current branch, but main is a branch name, not a commit hash, so the command fails. Even with a valid commit, cherry-pick duplicates a single commit and does not integrate all upstream changes. It does not produce a linear history of the feature branch relative to main.
Go deeper
Related to this question
About these practice questions
One of 975 original 200-901 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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Cisco exam blueprint
This 200-901 practice question is part of Courseiva's free Cisco 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 200-901 exam.