This chapter discusses selected commands ordered by category.
To reset a working tree file to the INDEX version use git checkout -- storage.py
.
To undo a git add storage.py
use git reset storage.py
(shortform for git reset HEAD storage.py), leaving the
file in the working tree untouched.
HEAD^
Differences wrt. last commit.
To reset the INDEX and the
working tree with the last commit use git reset --hard HEAD
.