Documentation / git-reset.txton commit Check repository format version in enter_repo(). (1644162)
   1git-reset(1)
   2============
   3
   4NAME
   5----
   6git-reset - Reset current HEAD to the specified state.
   7
   8SYNOPSIS
   9--------
  10'git-reset' [--mixed | --soft | --hard] [<commit-ish>]
  11
  12DESCRIPTION
  13-----------
  14Sets the current head to the specified commit and optionally resets the
  15index and working tree to match.
  16
  17This command is useful if you notice some small error in a recent
  18commit (or set of commits) and want to redo that part without showing
  19the undo in the history.
  20
  21If you want to undo a commit other than the latest on a branch,
  22gitlink:git-revert[1] is your friend.
  23
  24OPTIONS
  25-------
  26--mixed::
  27        Resets the index but not the working tree (ie, the changed files
  28        are preserved but not marked for commit) and reports what has not
  29        been updated. This is the default action.
  30
  31--soft::
  32        Does not touch the index file nor the working tree at all, but
  33        requires them to be in a good order. This leaves all your changed
  34        files "Updated but not checked in", as gitlink:git-status[1] would
  35        put it.
  36
  37--hard::
  38        Matches the working tree and index to that of the tree being
  39        switched to. Any changes to tracked files in the working tree
  40        since <commit-ish> are lost.
  41
  42<commit-ish>::
  43        Commit to make the current HEAD.
  44
  45Author
  46------
  47Written by Junio C Hamano <junkio@cox.net> and Linus Torvalds <torvalds@osdl.org>
  48
  49Documentation
  50--------------
  51Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
  52
  53GIT
  54---
  55Part of the gitlink:git[7] suite
  56