make some more strings translatable
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-rm.html.xml
blob4818f6d80ca47bdc15f1ab0bcbfb8d71d18de996
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-rm(1)">\r
5 <articleinfo>\r
6     <title>git-rm(1)</title>\r
7         <indexterm>\r
8                 <primary>git-rm(1)</primary>\r
9         </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-rm - Remove files from the working tree and from the index</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <simpara><emphasis>git rm</emphasis> [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] &lt;file&gt;&#8230;</simpara>\r
18 </simplesect>\r
19 <simplesect id="_description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>Remove files from the index, or from the working tree and the index.\r
22 <emphasis>git-rm</emphasis> will not remove a file from just your working directory.\r
23 (There is no option to remove a file only from the work tree\r
24 and yet keep it in the index; use <literal>/bin/rm</literal> if you want to do that.)\r
25 The files being removed have to be identical to the tip of the branch,\r
26 and no updates to their contents can be staged in the index,\r
27 though that default behavior can be overridden with the <literal>-f</literal> option.\r
28 When <emphasis>--cached</emphasis> is given, the staged content has to\r
29 match either the tip of the branch or the file on disk,\r
30 allowing the file to be removed from just the index.</simpara>\r
31 </simplesect>\r
32 <simplesect id="_options">\r
33 <title>OPTIONS</title>\r
34 <variablelist>\r
35 <varlistentry>\r
36 <term>\r
37 &lt;file&gt;&#8230;\r
38 </term>\r
39 <listitem>\r
40 <simpara>\r
41         Files to remove.  Fileglobs (e.g. <literal>*.c</literal>) can be given to\r
42         remove all matching files.  If you want git to expand\r
43         file glob characters, you may need to shell-escape them.\r
44         A leading directory name\r
45         (e.g. <literal>dir</literal> to remove <literal>dir/file1</literal> and <literal>dir/file2</literal>) can be\r
46         given to remove all files in the directory, and recursively\r
47         all sub-directories,\r
48         but this requires the <literal>-r</literal> option to be explicitly given.\r
49 </simpara>\r
50 </listitem>\r
51 </varlistentry>\r
52 <varlistentry>\r
53 <term>\r
54 -f\r
55 </term>\r
56 <term>\r
57 --force\r
58 </term>\r
59 <listitem>\r
60 <simpara>\r
61         Override the up-to-date check.\r
62 </simpara>\r
63 </listitem>\r
64 </varlistentry>\r
65 <varlistentry>\r
66 <term>\r
67 -n\r
68 </term>\r
69 <term>\r
70 --dry-run\r
71 </term>\r
72 <listitem>\r
73 <simpara>\r
74         Don&#8217;t actually remove any file(s).  Instead, just show\r
75         if they exist in the index and would otherwise be removed\r
76         by the command.\r
77 </simpara>\r
78 </listitem>\r
79 </varlistentry>\r
80 <varlistentry>\r
81 <term>\r
82 -r\r
83 </term>\r
84 <listitem>\r
85 <simpara>\r
86         Allow recursive removal when a leading directory name is\r
87         given.\r
88 </simpara>\r
89 </listitem>\r
90 </varlistentry>\r
91 <varlistentry>\r
92 <term>\r
93 --\r
94 </term>\r
95 <listitem>\r
96 <simpara>\r
97         This option can be used to separate command-line options from\r
98         the list of files, (useful when filenames might be mistaken\r
99         for command-line options).\r
100 </simpara>\r
101 </listitem>\r
102 </varlistentry>\r
103 <varlistentry>\r
104 <term>\r
105 --cached\r
106 </term>\r
107 <listitem>\r
108 <simpara>\r
109         Use this option to unstage and remove paths only from the index.\r
110         Working tree files, whether modified or not, will be\r
111         left alone.\r
112 </simpara>\r
113 </listitem>\r
114 </varlistentry>\r
115 <varlistentry>\r
116 <term>\r
117 --ignore-unmatch\r
118 </term>\r
119 <listitem>\r
120 <simpara>\r
121         Exit with a zero status even if no files matched.\r
122 </simpara>\r
123 </listitem>\r
124 </varlistentry>\r
125 <varlistentry>\r
126 <term>\r
127 -q\r
128 </term>\r
129 <term>\r
130 --quiet\r
131 </term>\r
132 <listitem>\r
133 <simpara>\r
134         <emphasis>git-rm</emphasis> normally outputs one line (in the form of an "rm" command)\r
135         for each file removed. This option suppresses that output.\r
136 </simpara>\r
137 </listitem>\r
138 </varlistentry>\r
139 </variablelist>\r
140 </simplesect>\r
141 <simplesect id="_discussion">\r
142 <title>DISCUSSION</title>\r
143 <simpara>The &lt;file&gt; list given to the command can be exact pathnames,\r
144 file glob patterns, or leading directory names.  The command\r
145 removes only the paths that are known to git.  Giving the name of\r
146 a file that you have not told git about does not remove that file.</simpara>\r
147 <simpara>File globbing matches across directory boundaries.  Thus, given\r
148 two directories &#8216;d` and <literal>d2</literal>, there is a difference between\r
149 using <literal>git rm 'd*&#8217;</literal> and &#8216;git rm 'd/\*\&#8217;<literal>, as the former will\r
150 also remove all of directory `d2</literal>.</simpara>\r
151 </simplesect>\r
152 <simplesect id="_examples">\r
153 <title>EXAMPLES</title>\r
154 <variablelist>\r
155 <varlistentry>\r
156 <term>\r
157 git rm Documentation/\\*.txt\r
158 </term>\r
159 <listitem>\r
160 <simpara>\r
161         Removes all <literal>\*.txt</literal> files from the index that are under the\r
162         <literal>Documentation</literal> directory and any of its subdirectories.\r
163 </simpara>\r
164 <simpara>Note that the asterisk <literal>\*</literal> is quoted from the shell in this\r
165 example; this lets git, and not the shell, expand the pathnames\r
166 of files and subdirectories under the <literal>Documentation/</literal> directory.</simpara>\r
167 </listitem>\r
168 </varlistentry>\r
169 <varlistentry>\r
170 <term>\r
171 git rm -f git-*.sh\r
172 </term>\r
173 <listitem>\r
174 <simpara>\r
175         Because this example lets the shell expand the asterisk\r
176         (i.e. you are listing the files explicitly), it\r
177         does not remove <literal>subdir/git-foo.sh</literal>.\r
178 </simpara>\r
179 </listitem>\r
180 </varlistentry>\r
181 </variablelist>\r
182 </simplesect>\r
183 <simplesect id="_see_also">\r
184 <title>SEE ALSO</title>\r
185 <simpara><xref linkend="git-add(1)"/></simpara>\r
186 </simplesect>\r
187 <simplesect id="_author">\r
188 <title>Author</title>\r
189 <simpara>Written by Linus Torvalds &lt;<ulink url="mailto:torvalds@osdl.org">torvalds@osdl.org</ulink>&gt;</simpara>\r
190 </simplesect>\r
191 <simplesect id="_documentation">\r
192 <title>Documentation</title>\r
193 <simpara>Documentation by Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>\r
194 </simplesect>\r
195 <simplesect id="_git">\r
196 <title>GIT</title>\r
197 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>\r
198 </simplesect>\r
199 </article>\r