Skills101
← All practice quizzes

Quiz: Undoing Changes

5 questionsNo time limitPass: 60%+10 XP on first pass

Fix mistakes safely: discard edits, unstage files, amend the last commit, reset vs revert with a picture, stash work in progress, and recover "lost" commits with reflog.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    A bad commit is already pushed and teammates pulled it. What's the safe way to undo it?

  2. Question 2

    Which reset keeps your changes staged?

  3. Question 3

    You need to switch branches but have unfinished, uncommitted work. What do you use?

  4. Question 4

    How do you unstage a file but keep its changes?

  5. Question 5

    What does git reflog help you do?