Skip to content

Commit d137b50

Browse files
SyntevoAlexgitster
authored andcommitted
doc: reset: synchronize <pathspec> description
`git add` shows an example of good writing, follow it. Signed-off-by: Alexandr Miloslavskiy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 24e4750 commit d137b50

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

Documentation/git-reset.txt

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ git-reset - Reset current HEAD to the specified state
88
SYNOPSIS
99
--------
1010
[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>...]
1313
'git reset' [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]
1414

1515
DESCRIPTION
@@ -19,23 +19,23 @@ In the third form, set the current branch head (`HEAD`) to `<commit>`,
1919
optionally modifying index and working tree to match.
2020
The `<tree-ish>`/`<commit>` defaults to `HEAD` in all forms.
2121

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.)
2626
+
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>...`.
3030
+
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
3232
use linkgit:git-restore[1] to check the contents out of the index to
3333
the working tree. Alternatively, using linkgit:git-restore[1]
3434
and specifying a commit with `--source`, you
3535
can copy the contents of a path out of a commit to the index and to the
3636
working tree in one go.
3737

38-
'git reset' (--patch | -p) [<tree-ish>] [--] [<paths>...]::
38+
'git reset' (--patch | -p) [<tree-ish>] [--] [<pathspec>...]::
3939
Interactively select hunks in the difference between the index
4040
and `<tree-ish>` (defaults to `HEAD`). The chosen hunks are applied
4141
in reverse to the index.
@@ -101,6 +101,13 @@ OPTIONS
101101
`reset.quiet` config option. `--quiet` and `--no-quiet` will
102102
override the default behavior.
103103

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].
104111

105112
EXAMPLES
106113
--------

builtin/reset.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030

3131
static const char * const git_reset_usage[] = {
3232
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>...]"),
3535
NULL
3636
};
3737

0 commit comments

Comments
 (0)