Embercode
✕
Git and GitHubQuick quiz

Stash

6 questions. Covers Stashing unfinished work.

Questions 1 to 5 of 6

  1. 1. You have uncommitted edits, and git switch feature is refused. Put these steps in the order that switches safely, does a short piece of work on feature, and brings your edits back.

    Use the arrows to put the steps in order.

    1. 1.Do the short piece of work on feature, commit it, then run git switch main
    2. 2.git stash pop
    3. 3.git switch feature
    4. 4.git stash push -m "work in progress"
  2. 2. To bring back the newest stash and delete its entry from the list in one step, run git stash ____.

    Type your answer.

  3. 3. You changed index.html and also created a new file, prices.txt. Which command stashes both, so that git status --short prints nothing afterwards?
  4. 4. The newest stash is stash@{0}. The stash that is second from the newest is stash@{___}.

    Type your answer.

  5. 5. You run git stash apply where you would normally run git stash pop. What is different?

4 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.