Question 213 of 505
Software Development and DesignmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is `git stash`, which is the correct Git command to temporarily save changes without committing. This command works by taking both staged and unstaged modifications in your working directory and storing them on a stack, then reverting your files to match the last commit. This allows you to switch branches freely without losing work, and later reapply those saved changes using `git stash pop` or `git stash apply`. On the Cisco DevNet Associate 200-901 exam, this question tests your understanding of Git workflow fundamentals, particularly how to handle in-progress work when you need to context-switch between branches. A common trap is confusing `git stash` with `git commit` or `git reset`; remember that `stash` is for temporary, uncommitted work, while `commit` permanently records changes. A helpful memory tip: think of "stash" like putting a jacket in a closet—you take it out later when you need it again, without losing it.

200-901 Software Development and Design Practice Question

This 200-901 practice question tests your understanding of software development and design. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A developer is using Git for source control. They have made changes to a file and want to temporarily save the changes without committing, then work on a different branch. Which Git command should they use?

Question 1mediummultiple choice
Full question →

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 stash

Option D is correct because `git stash` temporarily saves uncommitted changes (both staged and unstaged) to a stack, reverting the working directory to the last commit. This allows the developer to switch branches without losing work, then later reapply the changes with `git stash pop` or `git stash apply`.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 checkout other-branch

    Why it's wrong here

    Incorrect: This would fail if there are uncommitted changes.

  • git commit -m 'temp'

    Why it's wrong here

    Incorrect: This creates a commit, which is not temporary.

  • git reset --hard

    Why it's wrong here

    Incorrect: This discards changes permanently.

  • git stash

    Why this is correct

    Correct: Stashing saves changes for later use.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Cisco often tests the distinction between temporarily saving work (`git stash`) versus permanently committing or discarding changes, and the trap here is that candidates may think `git checkout` can switch branches regardless of dirty state, ignoring the conflict risk.

Detailed technical explanation

How to think about this question

`git stash` stores changes in a special ref (`refs/stash`) as a merge commit that captures the working directory and index states. It is particularly useful when you need to pull remote changes or switch branches quickly, and it supports options like `--include-untracked` or `--keep-index` for finer control. In real-world CI/CD workflows, developers often stash before rebasing to avoid merge conflicts.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the 200-901 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related 200-901 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free 200-901 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this 200-901 question test?

Software Development and Design — This question tests Software Development and Design — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: git stash — Option D is correct because `git stash` temporarily saves uncommitted changes (both staged and unstaged) to a stack, reverting the working directory to the last commit. This allows the developer to switch branches without losing work, then later reapply the changes with `git stash pop` or `git stash apply`.

What should I do if I get this 200-901 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.