@matheusbsbs / matheus-bagliano / commits / 7b8cd49d5c
Fork 0

Documentation/reset: separate options by mode

Remove all but -q from the OPTIONS section, and instead explain the options separated by usage mode, since they only apply to one each. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Jul 18, 2010 at 20:23 UTC 7b8cd49d5cc5aeb3723be616993bfc7fc847c34f
1 file changed +33 -26
Documentation/git-reset.txt
+33 -26
@@ -8,29 +8,39 @@ git-reset - Reset current HEAD to the specified state
8 SYNOPSIS
9 --------
10 [verse]
11 -'git reset' [--soft | --mixed | --hard | --merge | --keep] [-q] [<commit>]
11 'git reset' [-q] [<commit>] [--] <paths>...
12 'git reset' --patch [<commit>] [--] [<paths>...]
13 +'git reset' [--soft | --mixed | --hard | --merge | --keep] [-q] [<commit>]
14
15 DESCRIPTION
16 -----------
17 -Sets the current head to the specified commit and optionally resets the
18 -index and working tree to match.
19 -
20 -This command is useful if you notice some small error in a recent
21 -commit (or set of commits) and want to redo that part without showing
22 -the undo in the history.
23 -
24 -If you want to undo a commit other than the latest on a branch,
25 -linkgit:git-revert[1] is your friend.
26 -
27 -The second and third forms with 'paths' and/or --patch are used to
28 -revert selected paths in the index from a given commit, without moving
29 -HEAD.
17 +In the first and second form, copy entries from <commit> to the index.
18 +In the third form, set the current branch to <commit>, optionally
19 +modifying index and worktree to match. The <commit> defaults to HEAD
20 +in all forms.
21 +
22 +'git reset' [-q] [<commit>] [--] <paths>...::
23 + This form resets the index entries for all <paths> to their
24 + state at the <commit>. (It does not affect the worktree, nor
25 + the current branch.)
26 ++
27 +This means that `git reset <paths>` is the opposite of `git add
28 +<paths>`.
29
30 +'git reset' --patch|-p [<commit>] [--] [<paths>...]::
31 + Interactively select hunks in the difference between the index
32 + and <commit> (defaults to HEAD). The chosen hunks are applied
33 + in reverse to the index.
34 ++
35 +This means that `git reset -p` is the opposite of `git add -p` (see
36 +linkgit:git-add[1]).
37
32 -OPTIONS
33 --------
38 +'git reset' [--<mode>] [<commit>]::
39 + This form points the current branch to <commit> and then
40 + updates index and working tree according to <mode>, which must
41 + be one of the following:
42 ++
43 +--
44 --soft::
45 Does not touch the index file nor the working tree at all, but
46 requires them to be in a good order. This leaves all your changed
@@ -59,22 +69,19 @@ OPTIONS
69 the given commit. If a file that is different between the
70 current commit and the given commit has local changes, reset
71 is aborted.
72 +--
73
63 --p::
64 ---patch::
65 - Interactively select hunks in the difference between the index
66 - and <commit> (defaults to HEAD). The chosen hunks are applied
67 - in reverse to the index.
68 -+
69 -This means that `git reset -p` is the opposite of `git add -p` (see
70 -linkgit:git-add[1]).
74 +If you want to undo a commit other than the latest on a branch,
75 +linkgit:git-revert[1] is your friend.
76 +
77 +
78 +OPTIONS
79 +-------
80
81 -q::
82 --quiet::
83 Be quiet, only report errors.
84
76 -<commit>::
77 - Commit to make the current HEAD. If not given defaults to HEAD.
85
86 DISCUSSION
87 ----------