doc: reset: synchronize <pathspec> description
`git add` shows an example of good writing, follow it. Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexandr Miloslavskiy committed
Nov 19, 2019 at 16:48 UTC
d137b5075660d633ef93342974350f1d0657a54c
2 files changed
+20
-13
Documentation/git-reset.txt
+18
-11
@@ -8,8 +8,8 @@ git-reset - Reset current HEAD to the specified state
8
SYNOPSIS
9
--------
10
[verse]
11
-'git reset' [-q] [<tree-ish>] [--] <paths>...
12
-'git reset' (--patch | -p) [<tree-ish>] [--] [<paths>...]
11
+'git reset' [-q] [<tree-ish>] [--] <pathspec>...
12
+'git reset' (--patch | -p) [<tree-ish>] [--] [<pathspec>...]
13
'git reset' [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]
14
15
DESCRIPTION
@@ -19,23 +19,23 @@ In the third form, set the current branch head (`HEAD`) to `<commit>`,
19
optionally modifying index and working tree to match.
20
The `<tree-ish>`/`<commit>` defaults to `HEAD` in all forms.
21
22
-'git reset' [-q] [<tree-ish>] [--] <paths>...::
23
- This form resets the index entries for all `<paths>` to their
24
- state at `<tree-ish>`. (It does not affect the working tree or
25
- the current branch.)
22
+'git reset' [-q] [<tree-ish>] [--] <pathspec>...::
23
+ This form resets the index entries for all paths that match the
24
+ `<pathspec>` to their state at `<tree-ish>`. (It does not affect
25
+ the working tree or the current branch.)
26
+
27
-This means that `git reset <paths>` is the opposite of `git add
28
-<paths>`. This command is equivalent to
29
-`git restore [--source=<tree-ish>] --staged <paths>...`.
27
+This means that `git reset <pathspec>` is the opposite of `git add
28
+<pathspec>`. This command is equivalent to
29
+`git restore [--source=<tree-ish>] --staged <pathspec>...`.
30
+
31
-After running `git reset <paths>` to update the index entry, you can
31
+After running `git reset <pathspec>` to update the index entry, you can
32
use linkgit:git-restore[1] to check the contents out of the index to
33
the working tree. Alternatively, using linkgit:git-restore[1]
34
and specifying a commit with `--source`, you
35
can copy the contents of a path out of a commit to the index and to the
36
working tree in one go.
37
38
-'git reset' (--patch | -p) [<tree-ish>] [--] [<paths>...]::
38
+'git reset' (--patch | -p) [<tree-ish>] [--] [<pathspec>...]::
39
Interactively select hunks in the difference between the index
40
and `<tree-ish>` (defaults to `HEAD`). The chosen hunks are applied
41
in reverse to the index.
@@ -101,6 +101,13 @@ OPTIONS
101
`reset.quiet` config option. `--quiet` and `--no-quiet` will
102
override the default behavior.
103
104
+\--::
105
+ Do not interpret any more arguments as options.
106
+
107
+<pathspec>...::
108
+ Limits the paths affected by the operation.
109
++
110
+For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
111
112
EXAMPLES
113
--------
builtin/reset.c
+2
-2
@@ -30,8 +30,8 @@
30
31
static const char * const git_reset_usage[] = {
32
N_("git reset [--mixed | --soft | --hard | --merge | --keep] [-q] [<commit>]"),
33
- N_("git reset [-q] [<tree-ish>] [--] <paths>..."),
34
- N_("git reset --patch [<tree-ish>] [--] [<paths>...]"),
33
+ N_("git reset [-q] [<tree-ish>] [--] <pathspec>..."),
34
+ N_("git reset --patch [<tree-ish>] [--] [<pathspec>...]"),
35
NULL
36
};
37