git-reset.txt: Small fix + clarifications.
[git.git] / Documentation / git-reset.txt
1 git-reset(1)
2 ============
3
4 NAME
5 ----
6 git-reset - Reset current HEAD to the specified state.
7
8 SYNOPSIS
9 --------
10 'git-reset' [--mixed | --soft | --hard] [<commit-ish>]
11
12 DESCRIPTION
13 -----------
14 Sets the current head to the specified commit and optionally resets the
15 index and working tree to match.
16
17 This command is useful if you notice some small error in a recent
18 commit (or set of commits) and want to redo that part without showing
19 the undo in the history.
20
21 If you want to undo a commit other than the latest on a branch,
22 gitlink:git-revert[1] is your friend.
23
24 OPTIONS
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
45 Author
46 ------
47 Written by Junio C Hamano <junkio@cox.net> and Linus Torvalds <torvalds@osdl.org>
48
49 Documentation
50 --------------
51 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
52
53 GIT
54 ---
55 Part of the gitlink:git[7] suite
56