200-901 Software Development and Design Practice Question
A developer is using Git for version control in a collaborative project and wants to ensure a clean, linear history. Which TWO practices help achieve a linear commit history? (Choose two.)
⚠ Common exam trap
The trap here is thinking that merge commits are necessary for a linear history, but actually merge commits create a non-linear graph; rebasing and pull --rebase are the key practices.
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
✓
Use git rebase to integrate changes from the main branch into a feature branch before merging.
To maintain a linear commit history, developers should rebase feature branches onto the main branch before merging and use git pull --rebase when updating from a remote. These practices avoid merge commits and keep the commit graph as a straight line. They are widely adopted in teams that prioritize a clean, readable history.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use git rebase to integrate changes from the main branch into a feature branch before merging.
Why this is correct
Rebasing a feature branch onto the main branch rewrites the feature branch's commits to apply on top of the latest main, resulting in a linear history when merged. This avoids merge commits and keeps the commit graph clean. It is a common practice in teams that prefer a linear history, though it should be used with caution on shared branches.
- ✗
Use git merge with the --no-ff flag to always create a merge commit.
Why it's wrong here
The --no-ff flag forces a merge commit even when a fast-forward is possible, which introduces a merge commit and creates a non-linear history. This is the opposite of what is desired for a linear history. Teams that want a linear history typically avoid merge commits and use rebase or fast-forward merges instead.
- ✗
Use git commit --amend to modify the most recent commit.
Why it's wrong here
Amending a commit replaces the last commit with a new one, which can clean up local history but does not directly contribute to linear history when integrating branches. It is a local operation and does not affect how branches are merged or rebased. While useful for fixing mistakes, it is not a practice for achieving linear history across branches.
- ✓
Use git pull --rebase to fetch and rebase local changes on top of the remote branch.
Why this is correct
git pull --rebase fetches the latest changes from the remote and then rebases your local commits on top of them, instead of creating a merge commit. This keeps the local history linear and avoids unnecessary merge commits when integrating remote changes. It is a best practice for maintaining a clean, linear history in collaborative workflows.
- ✗
Use git cherry-pick to apply specific commits from one branch to another.
Why it's wrong here
Cherry-picking copies individual commits onto another branch, which can create duplicate commits with different hashes and does not inherently produce a linear history. It is useful for selectively applying changes but can lead to a messy history if overused. It is not a primary practice for maintaining linear history.
Go deeper
Related to this question
About these practice questions
This 200-901 question is part of Courseiva's 975-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.