$ ./guess_the_languageGit
Git · medium · #32

What happens to the changes from the undone commit?

git reset --soft HEAD~1
  1. They stay staged in the index
  2. They are discarded completely
  3. They move to a new stash entry
  4. They remain only in the working tree
--soft only moves the branch pointer. The index and working tree are untouched, so the changes are ready to be committed again.
Play Git ▸