Debian Codegraph @

doc/html/hg-remove.html

raw
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" />
7 <title>hg remove</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="hg-remove">
12 <span id="hg-remove-1"></span>
13 <h1 class="title">hg remove</h1>
14 <h2 class="subtitle" id="remove-the-specified-files-on-the-next-commit">remove the specified files on the next commit</h2>
15
16 <div class="contents htmlonly topic" id="contents">
17 <p class="topic-title"><a class="reference internal" href="#top">Contents</a></p>
18 <ul class="simple">
19 <li><a class="reference internal" href="#synopsis" id="toc-entry-1">Synopsis</a></li>
20 <li><a class="reference internal" href="#description" id="toc-entry-2">Description</a></li>
21 <li><a class="reference internal" href="#options" id="toc-entry-3">Options</a></li>
22 <li><a class="reference internal" href="#aliases" id="toc-entry-4">Aliases</a></li>
23 </ul>
24 </div>
25 <div class="section" id="synopsis">
26 <h1><a class="toc-backref" href="#contents">Synopsis</a></h1>
27 <pre class="literal-block">
28 hg remove [OPTION]... FILE...
29 </pre>
30 </div>
31 <div class="section" id="description">
32 <h1><a class="toc-backref" href="#contents">Description</a></h1>
33 <p>Schedule the indicated files for removal from the current branch.</p>
34 <p>This command schedules the files to be removed at the next commit.
35 To undo a remove before that, see <a class="reference external" href="hg-revert.html"><tt class="docutils literal">hg revert</tt></a>. To undo added
36 files, see <a class="reference external" href="hg-forget.html"><tt class="docutils literal">hg forget</tt></a>.</p>
37 <div class="verbose docutils container">
38 <p>-A/--after can be used to remove only files that have already
39 been deleted, -f/--force can be used to force deletion, and -Af
40 can be used to remove files from the next revision without
41 deleting them from the working directory.</p>
42 <p>The following table details the behavior of remove for different
43 file states (columns) and option combinations (rows). The file
44 states are Added [A], Clean [C], Modified [M] and Missing [!]
45 (as reported by <a class="reference external" href="hg-status.html"><tt class="docutils literal">hg status</tt></a>). The actions are Warn, Remove
46 (from branch) and Delete (from disk):</p>
47 <table border="1" class="docutils">
48 <colgroup>
49 <col width="53%" />
50 <col width="12%" />
51 <col width="12%" />
52 <col width="12%" />
53 <col width="12%" />
54 </colgroup>
55 <thead valign="bottom">
56 <tr><th class="head">opt/state</th>
57 <th class="head">A</th>
58 <th class="head">C</th>
59 <th class="head">M</th>
60 <th class="head">!</th>
61 </tr>
62 </thead>
63 <tbody valign="top">
64 <tr><td>none</td>
65 <td>W</td>
66 <td>RD</td>
67 <td>W</td>
68 <td>R</td>
69 </tr>
70 <tr><td>-f</td>
71 <td>R</td>
72 <td>RD</td>
73 <td>RD</td>
74 <td>R</td>
75 </tr>
76 <tr><td>-A</td>
77 <td>W</td>
78 <td>W</td>
79 <td>W</td>
80 <td>R</td>
81 </tr>
82 <tr><td>-Af</td>
83 <td>R</td>
84 <td>R</td>
85 <td>R</td>
86 <td>R</td>
87 </tr>
88 </tbody>
89 </table>
90 <div class="admonition note">
91 <p class="first admonition-title">Note</p>
92 <p class="last"><a class="reference external" href="hg-remove.html"><tt class="docutils literal">hg remove</tt></a> never deletes files in Added [A] state from the
93 working directory, not even if <tt class="docutils literal"><span class="pre">--force</span></tt> is specified.</p>
94 </div>
95 </div>
96 <p>Returns 0 on success, 1 if any warnings encountered.</p>
97 </div>
98 <div class="section" id="options">
99 <h1><a class="toc-backref" href="#contents">Options</a></h1>
100 <table class="docutils option-list" frame="void" rules="none">
101 <col class="option" />
102 <col class="description" />
103 <tbody valign="top">
104 <tr><td class="option-group">
105 <kbd><span class="option">-A</span>, <span class="option">--after</span></kbd></td>
106 <td>record delete for missing files</td></tr>
107 <tr><td class="option-group">
108 <kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td>
109 <td>forget added files, delete modified files</td></tr>
110 <tr><td class="option-group">
111 <kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td>
112 <td>recurse into subrepositories</td></tr>
113 <tr><td class="option-group" colspan="2">
114 <kbd><span class="option">-I</span>, <span class="option">--include <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
115 </tr>
116 <tr><td>&nbsp;</td><td>include names matching the given patterns</td></tr>
117 <tr><td class="option-group" colspan="2">
118 <kbd><span class="option">-X</span>, <span class="option">--exclude <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
119 </tr>
120 <tr><td>&nbsp;</td><td>exclude names matching the given patterns</td></tr>
121 <tr><td class="option-group">
122 <kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td>
123 <td>do not perform actions, just print output</td></tr>
124 </tbody>
125 </table>
126 <p>[+] marked option can be specified multiple times</p>
127 </div>
128 <div class="section" id="aliases">
129 <h1><a class="toc-backref" href="#contents">Aliases</a></h1>
130 <pre class="literal-block">
131 rm
132 </pre>
133 </div>
134 </div>
135 </body>
136 </html>