Git fork

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 <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Jean-Noël Avila and committed by
Junio C Hamano
be9819c8 115a753d

+28 -28
+28 -28
Documentation/git-rm.adoc
··· 7 8 SYNOPSIS 9 -------- 10 - [verse] 11 - 'git rm' [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] 12 - [--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]] 13 - [--] [<pathspec>...] 14 15 DESCRIPTION 16 ----------- ··· 30 31 OPTIONS 32 ------- 33 - <pathspec>...:: 34 Files to remove. A leading directory name (e.g. `dir` to remove 35 `dir/file1` and `dir/file2`) can be given to remove all files in 36 the directory, and recursively all sub-directories, but this ··· 43 `git rm 'd*'` and `git rm 'd/*'`, as the former will also remove all 44 of directory `d2`. 45 + 46 - For more details, see the 'pathspec' entry in linkgit:gitglossary[7]. 47 48 - -f:: 49 - --force:: 50 Override the up-to-date check. 51 52 - -n:: 53 - --dry-run:: 54 Don't actually remove any file(s). Instead, just show 55 if they exist in the index and would otherwise be removed 56 by the command. 57 58 - -r:: 59 Allow recursive removal when a leading directory name is 60 given. 61 62 - \--:: 63 This option can be used to separate command-line options from 64 the list of files, (useful when filenames might be mistaken 65 for command-line options). 66 67 - --cached:: 68 Use this option to unstage and remove paths only from the index. 69 Working tree files, whether modified or not, will be 70 left alone. 71 72 - --ignore-unmatch:: 73 Exit with a zero status even if no files matched. 74 75 - --sparse:: 76 Allow updating index entries outside of the sparse-checkout cone. 77 Normally, `git rm` refuses to update index entries whose paths do 78 not fit within the sparse-checkout cone. See 79 linkgit:git-sparse-checkout[1] for more. 80 81 - -q:: 82 - --quiet:: 83 `git rm` normally outputs one line (in the form of an `rm` command) 84 for each file removed. This option suppresses that output. 85 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 90 quoted as explained for the configuration variable `core.quotePath` 91 (see linkgit:git-config[1]). See also `--pathspec-file-nul` and 92 global `--literal-pathspecs`. 93 94 - --pathspec-file-nul:: 95 Only meaningful with `--pathspec-from-file`. Pathspec elements are 96 - separated with NUL character and all other characters are taken 97 literally (including newlines and quotes). 98 99 ··· 153 ---------- 154 Only submodules using a gitfile (which means they were cloned 155 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 157 superproject. If a submodule (or one of those nested inside it) 158 - still uses a .git directory, `git rm` will move the submodules 159 git directory into the superprojects git directory to protect 160 - the submodule's history. If it exists the submodule.<name> section 161 in the linkgit:gitmodules[5] file will also be removed and that file 162 - will be staged (unless --cached or -n are used). 163 164 - A submodule is considered up to date when the HEAD is the same as 165 recorded in the index, no tracked files are modified and no untracked 166 files that aren't ignored are present in the submodule's work tree. 167 Ignored files are deemed expendable and won't stop a submodule's work
··· 7 8 SYNOPSIS 9 -------- 10 + [synopsis] 11 + git rm [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] 12 + [--quiet] [--pathspec-from-file=<file> [--pathspec-file-nul]] 13 + [--] [<pathspec>...] 14 15 DESCRIPTION 16 ----------- ··· 30 31 OPTIONS 32 ------- 33 + `<pathspec>...`:: 34 Files to remove. A leading directory name (e.g. `dir` to remove 35 `dir/file1` and `dir/file2`) can be given to remove all files in 36 the directory, and recursively all sub-directories, but this ··· 43 `git rm 'd*'` and `git rm 'd/*'`, as the former will also remove all 44 of directory `d2`. 45 + 46 + For more details, see the _<pathspec>_ entry in linkgit:gitglossary[7]. 47 48 + `-f`:: 49 + `--force`:: 50 Override the up-to-date check. 51 52 + `-n`:: 53 + `--dry-run`:: 54 Don't actually remove any file(s). Instead, just show 55 if they exist in the index and would otherwise be removed 56 by the command. 57 58 + `-r`:: 59 Allow recursive removal when a leading directory name is 60 given. 61 62 + `--`:: 63 This option can be used to separate command-line options from 64 the list of files, (useful when filenames might be mistaken 65 for command-line options). 66 67 + `--cached`:: 68 Use this option to unstage and remove paths only from the index. 69 Working tree files, whether modified or not, will be 70 left alone. 71 72 + `--ignore-unmatch`:: 73 Exit with a zero status even if no files matched. 74 75 + `--sparse`:: 76 Allow updating index entries outside of the sparse-checkout cone. 77 Normally, `git rm` refuses to update index entries whose paths do 78 not fit within the sparse-checkout cone. See 79 linkgit:git-sparse-checkout[1] for more. 80 81 + `-q`:: 82 + `--quiet`:: 83 `git rm` normally outputs one line (in the form of an `rm` command) 84 for each file removed. This option suppresses that output. 85 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 90 quoted as explained for the configuration variable `core.quotePath` 91 (see linkgit:git-config[1]). See also `--pathspec-file-nul` and 92 global `--literal-pathspecs`. 93 94 + `--pathspec-file-nul`:: 95 Only meaningful with `--pathspec-from-file`. Pathspec elements are 96 + separated with _NUL_ character and all other characters are taken 97 literally (including newlines and quotes). 98 99 ··· 153 ---------- 154 Only submodules using a gitfile (which means they were cloned 155 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 157 superproject. If a submodule (or one of those nested inside it) 158 + still uses a `.git` directory, `git rm` moves the submodules 159 git directory into the superprojects git directory to protect 160 + the submodule's history. If it exists the `submodule.<name>` section 161 in the linkgit:gitmodules[5] file will also be removed and that file 162 + will be staged (unless `--cached` or `-n` are used). 163 164 + A submodule is considered up to date when the `HEAD` is the same as 165 recorded in the index, no tracked files are modified and no untracked 166 files that aren't ignored are present in the submodule's work tree. 167 Ignored files are deemed expendable and won't stop a submodule's work