Skip to content

Commit be9819c

Browse files
jnavilagitster
authored andcommitted
doc: convert git-rm to new documentation format
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. Signed-off-by: Jean-Noël Avila <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 115a753 commit be9819c

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

Documentation/git-rm.adoc

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ git-rm - Remove files from the working tree and from the index
77

88
SYNOPSIS
99
--------
10-
[verse]
11-
'git rm' [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch]
12-
[--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]]
13-
[--] [<pathspec>...]
10+
[synopsis]
11+
git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch]
12+
[--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]]
13+
[--] [<pathspec>...]
1414

1515
DESCRIPTION
1616
-----------
@@ -30,7 +30,7 @@ sparse-checkouts are in use (see linkgit:git-sparse-checkout[1]),
3030

3131
OPTIONS
3232
-------
33-
<pathspec>...::
33+
`<pathspec>...`::
3434
Files to remove. A leading directory name (e.g. `dir` to remove
3535
`dir/file1` and `dir/file2`) can be given to remove all files in
3636
the directory, and recursively all sub-directories, but this
@@ -43,57 +43,57 @@ directories `d` and `d2`, there is a difference between using
4343
`git rm 'd*'` and `git rm 'd/*'`, as the former will also remove all
4444
of directory `d2`.
4545
+
46-
For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
46+
For more details, see the _<pathspec>_ entry in linkgit:gitglossary[7].
4747

48-
-f::
49-
--force::
48+
`-f`::
49+
`--force`::
5050
Override the up-to-date check.
5151

52-
-n::
53-
--dry-run::
52+
`-n`::
53+
`--dry-run`::
5454
Don't actually remove any file(s). Instead, just show
5555
if they exist in the index and would otherwise be removed
5656
by the command.
5757

58-
-r::
58+
`-r`::
5959
Allow recursive removal when a leading directory name is
6060
given.
6161

62-
\--::
62+
`--`::
6363
This option can be used to separate command-line options from
6464
the list of files, (useful when filenames might be mistaken
6565
for command-line options).
6666

67-
--cached::
67+
`--cached`::
6868
Use this option to unstage and remove paths only from the index.
6969
Working tree files, whether modified or not, will be
7070
left alone.
7171

72-
--ignore-unmatch::
72+
`--ignore-unmatch`::
7373
Exit with a zero status even if no files matched.
7474

75-
--sparse::
75+
`--sparse`::
7676
Allow updating index entries outside of the sparse-checkout cone.
7777
Normally, `git rm` refuses to update index entries whose paths do
7878
not fit within the sparse-checkout cone. See
7979
linkgit:git-sparse-checkout[1] for more.
8080

81-
-q::
82-
--quiet::
81+
`-q`::
82+
`--quiet`::
8383
`git rm` normally outputs one line (in the form of an `rm` command)
8484
for each file removed. This option suppresses that output.
8585

86-
--pathspec-from-file=<file>::
87-
Pathspec is passed in `<file>` instead of commandline args. If
88-
`<file>` is exactly `-` then standard input is used. Pathspec
89-
elements are separated by LF or CR/LF. Pathspec elements can be
86+
`--pathspec-from-file=<file>`::
87+
Pathspec is passed in _<file>_ instead of args. If
88+
_<file>_ is exactly `-` then standard input is used. Pathspec
89+
elements are separated by _LF_ or _CR_/_LF_. Pathspec elements can be
9090
quoted as explained for the configuration variable `core.quotePath`
9191
(see linkgit:git-config[1]). See also `--pathspec-file-nul` and
9292
global `--literal-pathspecs`.
9393

94-
--pathspec-file-nul::
94+
`--pathspec-file-nul`::
9595
Only meaningful with `--pathspec-from-file`. Pathspec elements are
96-
separated with NUL character and all other characters are taken
96+
separated with _NUL_ character and all other characters are taken
9797
literally (including newlines and quotes).
9898

9999

@@ -153,15 +153,15 @@ SUBMODULES
153153
----------
154154
Only submodules using a gitfile (which means they were cloned
155155
with a Git version 1.7.8 or newer) will be removed from the work
156-
tree, as their repository lives inside the .git directory of the
156+
tree, as their repository lives inside the `.git` directory of the
157157
superproject. If a submodule (or one of those nested inside it)
158-
still uses a .git directory, `git rm` will move the submodules
158+
still uses a `.git` directory, `git rm` moves the submodules
159159
git directory into the superprojects git directory to protect
160-
the submodule's history. If it exists the submodule.<name> section
160+
the submodule's history. If it exists the `submodule.<name>` section
161161
in the linkgit:gitmodules[5] file will also be removed and that file
162-
will be staged (unless --cached or -n are used).
162+
will be staged (unless `--cached` or `-n` are used).
163163

164-
A submodule is considered up to date when the HEAD is the same as
164+
A submodule is considered up to date when the `HEAD` is the same as
165165
recorded in the index, no tracked files are modified and no untracked
166166
files that aren't ignored are present in the submodule's work tree.
167167
Ignored files are deemed expendable and won't stop a submodule's work

0 commit comments

Comments
 (0)