hardMultiple Select
200-901 Practice Question: Which TWO of the following Git commands modify…
Which TWO of the following Git commands modify the commit history? (Select TWO)
⚠ Common exam trap
Cisco often tests the distinction between read-only inspection commands (like `git diff`, `git log`, `git status`) and commands that actually rewrite commit history, leading candidates to mistakenly select non-modifying commands.
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 commit --amend
git commit --amend is correct because it rewrites the most recent commit, replacing it with a new commit object that includes staged changes and/or an edited commit message, thereby altering commit history. git rebase -i is correct because interactive rebase lets you reorder, edit, squash, split, or drop existing commits, which rewrites the branch's commit history and produces new commit SHAs. The other options are read-only inspection commands: git diff shows unstaged or staged changes between working tree, index, and commits, git log displays the commit history, and git status reports working tree and index state — none of them modify commit 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.
- ✗
git diff
Why it's wrong here
`git diff` compares working tree, index, or commit contents and writes nothing to the object database, so no commit history changes. It is tempting because it inspects changes across revisions, which is what you want when reviewing edits before staging or verifying a patch — but inspection never rewrites commits, unlike `git commit --amend` or `git rebase`.
- ✗
git log
Why it's wrong here
git log only reads and displays the commit history; it never rewrites, reorders or removes commits. It is tempting because it is the primary tool for inspecting history, and would be the right choice when you need to review commit messages, authors or hashes before deciding which history-altering command to run.
- ✓
git commit --amend
Why this is correct
git commit --amend rewrites the most recent commit, replacing it with a new commit object that has a different hash, thereby altering commit history. This differs from commands such as git commit, which only append new commits.
- ✓
git rebase -i
Why this is correct
Interactive rebase opens an editor listing commits, letting you reorder, squash, edit or drop them, thereby rewriting commit history. This directly satisfies the stem's requirement for a command that modifies commit history, unlike read-only commands such as git log or git status.
- ✗
git status
Why it's wrong here
git status reports working-tree and index state against HEAD; it writes nothing to the commit graph. It is tempting because it is the routine first command for seeing staged and unstaged changes, and would be correct when you need to confirm which files are modified before staging or committing them.
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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.