🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Undoing Changes: all 10 questions

Quiz: Undoing Changes · Question 3 of 10

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

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

  1. A.git reset --hard
  2. B.git stash
  3. C.git revert
  4. D.git push
Answer & explanation

Correct answer: git stash

stash saves the work aside; stash pop brings it back.

Can you get the rest right without peeking?

Take the timed Quiz: Undoing Changes quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →