What's the quickest way to undo changes (staged and unstaged) in Git?
Both files unstaged.
$ git status -s
M file1.txt # unstaged
?? oops.txt # unstaged
One file staged, one file unstaged.
$ git status -s
M file1.txt # staged
?? oops.txt # unstaged
I can add
all to index and then stash
save
and drop
.
$ git add .
$ git stash save
$ git stash drop
$ git status
nothing to commit, working directory clean
Is there a quicker way?