git reset
git-reset - Reset current HEAD to the specified
state
git reset [
This form resets the current branch head to
it to the tree of
depending on
ORIG_HEAD is set to the tip of the current branch.
If
—soft
Does not touch the index file or the working tree
at all (but resets the head to
all modes do). This leaves all your changed files
”Changes to be committed”, as git status would put
it.
—mixed
Resets the index but not the working tree (i.e.,
the changed files are preserved but not marked for
commit) and reports what has not been updated.
This is the default action.
—hard
Resets the index and working tree. Any changes to
tracked files in the working tree since
are discarded. Any untracked files or directories
in the way of writing any tracked files are simply
deleted.
—merge
—keep