blob: dbcebefcf921bd565f4bc4670f8bf6e9c8a55540 [file] [log] [blame]
Junio C Hamano34b18112006-02-23 11:21:401<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
Junio C Hamano9d971152012-12-19 00:43:115<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
Junio C Hamanobc8d4782014-01-13 23:35:506<meta name="generator" content="AsciiDoc 8.6.6" />
Junio C Hamano28e6d1f2010-12-08 02:06:147<title>git-rm(1)</title>
Junio C Hamano34b18112006-02-23 11:21:408<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:119/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
11/* Default font. */
12body {
13 font-family: Georgia,serif;
14}
15
16/* Title font. */
17h1, h2, h3, h4, h5, h6,
18div.title, caption.title,
19thead, p.table.header,
20#toctitle,
21#author, #revnumber, #revdate, #revremark,
22#footer {
23 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano34b18112006-02-23 11:21:4024}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
Junio C Hamanoba4b9282008-07-06 05:20:3130a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
Junio C Hamano34b18112006-02-23 11:21:4037
38em {
39 font-style: italic;
Junio C Hamano28e6d1f2010-12-08 02:06:1440 color: navy;
Junio C Hamano34b18112006-02-23 11:21:4041}
42
43strong {
44 font-weight: bold;
Junio C Hamano28e6d1f2010-12-08 02:06:1445 color: #083194;
Junio C Hamano34b18112006-02-23 11:21:4046}
47
Junio C Hamano34b18112006-02-23 11:21:4048h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano34b18112006-02-23 11:21:4050 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
Junio C Hamanoba4b9282008-07-06 05:20:3155h1, h2, h3 {
Junio C Hamano34b18112006-02-23 11:21:4056 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamano34b18112006-02-23 11:21:4059 padding-top: 0.5em;
60}
Junio C Hamanoba4b9282008-07-06 05:20:3161h3 {
62 float: left;
63}
64h3 + * {
65 clear: left;
66}
Junio C Hamano9d971152012-12-19 00:43:1167h5 {
68 font-size: 1.0em;
69}
Junio C Hamano34b18112006-02-23 11:21:4070
71div.sectionbody {
Junio C Hamano34b18112006-02-23 11:21:4072 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
Junio C Hamano28e6d1f2010-12-08 02:06:1484ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9d971152012-12-19 00:43:1187ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano28e6d1f2010-12-08 02:06:1489
Junio C Hamanobc8d4782014-01-13 23:35:5090pre {
Junio C Hamano34b18112006-02-23 11:21:4091 padding: 0;
92 margin: 0;
93}
94
Junio C Hamano9d971152012-12-19 00:43:1195#author {
Junio C Hamano34b18112006-02-23 11:21:4096 color: #527bbd;
Junio C Hamano34b18112006-02-23 11:21:4097 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3198 font-size: 1.1em;
Junio C Hamano34b18112006-02-23 11:21:4099}
Junio C Hamano9d971152012-12-19 00:43:11100#email {
Junio C Hamano34b18112006-02-23 11:21:40101}
Junio C Hamano9d971152012-12-19 00:43:11102#revnumber, #revdate, #revremark {
Junio C Hamano34b18112006-02-23 11:21:40103}
104
Junio C Hamano9d971152012-12-19 00:43:11105#footer {
Junio C Hamano34b18112006-02-23 11:21:40106 font-size: small;
107 border-top: 2px solid silver;
108 padding-top: 0.5em;
109 margin-top: 4.0em;
110}
Junio C Hamano9d971152012-12-19 00:43:11111#footer-text {
Junio C Hamano34b18112006-02-23 11:21:40112 float: left;
113 padding-bottom: 0.5em;
114}
Junio C Hamano9d971152012-12-19 00:43:11115#footer-badges {
Junio C Hamano34b18112006-02-23 11:21:40116 float: right;
117 padding-bottom: 0.5em;
118}
119
Junio C Hamano9d971152012-12-19 00:43:11120#preamble {
Junio C Hamano28e6d1f2010-12-08 02:06:14121 margin-top: 1.5em;
122 margin-bottom: 1.5em;
123}
Junio C Hamano9d971152012-12-19 00:43:11124div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano34b18112006-02-23 11:21:40125div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
126div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22127 margin-top: 1.0em;
Junio C Hamano34b18112006-02-23 11:21:40128 margin-bottom: 1.5em;
129}
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 2.0em;
132 margin-bottom: 2.0em;
133 margin-right: 10%;
134 color: #606060;
Junio C Hamano34b18112006-02-23 11:21:40135}
136
137div.content { /* Block element content. */
138 padding: 0;
139}
140
141/* Block element titles. */
142div.title, caption.title {
Junio C Hamano28e6d1f2010-12-08 02:06:14143 color: #527bbd;
Junio C Hamano34b18112006-02-23 11:21:40144 font-weight: bold;
145 text-align: left;
146 margin-top: 1.0em;
147 margin-bottom: 0.5em;
148}
149div.title + * {
150 margin-top: 0;
151}
152
153td div.title:first-child {
154 margin-top: 0.0em;
155}
156div.content div.title:first-child {
157 margin-top: 0.0em;
158}
159div.content + div.title {
160 margin-top: 0.0em;
161}
162
163div.sidebarblock > div.content {
164 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11165 border: 1px solid #dddddd;
166 border-left: 4px solid #f0f0f0;
Junio C Hamano34b18112006-02-23 11:21:40167 padding: 0.5em;
168}
169
170div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11171 border: 1px solid #dddddd;
172 border-left: 5px solid #f0f0f0;
173 background: #f8f8f8;
Junio C Hamano34b18112006-02-23 11:21:40174 padding: 0.5em;
175}
176
Junio C Hamano7bd050f2011-09-22 06:32:22177div.quoteblock, div.verseblock {
178 padding-left: 1.0em;
179 margin-left: 1.0em;
Junio C Hamano28e6d1f2010-12-08 02:06:14180 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11181 border-left: 5px solid #f0f0f0;
182 color: #888;
Junio C Hamano34b18112006-02-23 11:21:40183}
Junio C Hamano7bd050f2011-09-22 06:32:22184
Junio C Hamano28e6d1f2010-12-08 02:06:14185div.quoteblock > div.attribution {
186 padding-top: 0.5em;
Junio C Hamano34b18112006-02-23 11:21:40187 text-align: right;
188}
Junio C Hamano28e6d1f2010-12-08 02:06:14189
Junio C Hamano9d971152012-12-19 00:43:11190div.verseblock > pre.content {
191 font-family: inherit;
192 font-size: inherit;
Junio C Hamano28e6d1f2010-12-08 02:06:14193}
194div.verseblock > div.attribution {
195 padding-top: 0.75em;
196 text-align: left;
197}
198/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31199div.verseblock + div.attribution {
200 text-align: left;
201}
Junio C Hamano34b18112006-02-23 11:21:40202
203div.admonitionblock .icon {
204 vertical-align: top;
205 font-size: 1.1em;
206 font-weight: bold;
207 text-decoration: underline;
208 color: #527bbd;
209 padding-right: 0.5em;
210}
211div.admonitionblock td.content {
212 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22213 border-left: 3px solid #dddddd;
Junio C Hamano34b18112006-02-23 11:21:40214}
215
216div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
218 padding-left: 0.5em;
Junio C Hamano34b18112006-02-23 11:21:40219}
220
Junio C Hamano34b18112006-02-23 11:21:40221div.imageblock div.content { padding-left: 0; }
Junio C Hamano34b18112006-02-23 11:21:40222span.image img { border-style: none; }
Junio C Hamano28e6d1f2010-12-08 02:06:14223a.image:visited { color: white; }
Junio C Hamano34b18112006-02-23 11:21:40224
225dl {
226 margin-top: 0.8em;
227 margin-bottom: 0.8em;
228}
229dt {
230 margin-top: 0.5em;
231 margin-bottom: 0;
Junio C Hamano28e6d1f2010-12-08 02:06:14232 font-style: normal;
233 color: navy;
Junio C Hamano34b18112006-02-23 11:21:40234}
235dd > *:first-child {
Junio C Hamano28e6d1f2010-12-08 02:06:14236 margin-top: 0.1em;
Junio C Hamano34b18112006-02-23 11:21:40237}
238
239ul, ol {
240 list-style-position: outside;
241}
Junio C Hamano28e6d1f2010-12-08 02:06:14242ol.arabic {
243 list-style-type: decimal;
244}
245ol.loweralpha {
Junio C Hamano34b18112006-02-23 11:21:40246 list-style-type: lower-alpha;
247}
Junio C Hamano28e6d1f2010-12-08 02:06:14248ol.upperalpha {
249 list-style-type: upper-alpha;
250}
251ol.lowerroman {
252 list-style-type: lower-roman;
253}
254ol.upperroman {
255 list-style-type: upper-roman;
256}
257
258div.compact ul, div.compact ol,
259div.compact p, div.compact p,
260div.compact div, div.compact div {
261 margin-top: 0.1em;
262 margin-bottom: 0.1em;
263}
Junio C Hamano34b18112006-02-23 11:21:40264
Junio C Hamano34b18112006-02-23 11:21:40265tfoot {
266 font-weight: bold;
267}
Junio C Hamano28e6d1f2010-12-08 02:06:14268td > div.verse {
269 white-space: pre;
270}
Junio C Hamano28e6d1f2010-12-08 02:06:14271
272div.hdlist {
Junio C Hamano34b18112006-02-23 11:21:40273 margin-top: 0.8em;
274 margin-bottom: 0.8em;
275}
Junio C Hamano28e6d1f2010-12-08 02:06:14276div.hdlist tr {
277 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31278}
Junio C Hamano28e6d1f2010-12-08 02:06:14279dt.hdlist1.strong, td.hdlist1.strong {
280 font-weight: bold;
281}
282td.hdlist1 {
Junio C Hamano34b18112006-02-23 11:21:40283 vertical-align: top;
Junio C Hamano28e6d1f2010-12-08 02:06:14284 font-style: normal;
Junio C Hamano34b18112006-02-23 11:21:40285 padding-right: 0.8em;
Junio C Hamano28e6d1f2010-12-08 02:06:14286 color: navy;
Junio C Hamano34b18112006-02-23 11:21:40287}
Junio C Hamano28e6d1f2010-12-08 02:06:14288td.hdlist2 {
Junio C Hamano34b18112006-02-23 11:21:40289 vertical-align: top;
290}
Junio C Hamano28e6d1f2010-12-08 02:06:14291div.hdlist.compact tr {
292 margin: 0;
293 padding-bottom: 0;
294}
295
296.comment {
297 background: yellow;
298}
Junio C Hamano34b18112006-02-23 11:21:40299
Junio C Hamano7bd050f2011-09-22 06:32:22300.footnote, .footnoteref {
301 font-size: 0.8em;
302}
303
304span.footnote, span.footnoteref {
305 vertical-align: super;
306}
307
308#footnotes {
309 margin: 20px 0 20px 0;
310 padding: 7px 0 0 0;
311}
312
313#footnotes div.footnote {
314 margin: 0 0 5px 0;
315}
316
317#footnotes hr {
318 border: none;
319 border-top: 1px solid silver;
320 height: 1px;
321 text-align: left;
322 margin-left: 0;
323 width: 20%;
324 min-width: 100px;
325}
326
Junio C Hamano9d971152012-12-19 00:43:11327div.colist td {
328 padding-right: 0.5em;
329 padding-bottom: 0.3em;
330 vertical-align: top;
331}
332div.colist td img {
333 margin-top: 0.3em;
Junio C Hamano34b18112006-02-23 11:21:40334}
Junio C Hamanoba4b9282008-07-06 05:20:31335
Junio C Hamano9d971152012-12-19 00:43:11336@media print {
337 #footer-badges { display: none; }
338}
339
340#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22341 margin-bottom: 2.5em;
342}
343
Junio C Hamano9d971152012-12-19 00:43:11344#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31345 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31346 font-size: 1.1em;
347 font-weight: bold;
348 margin-top: 1.0em;
349 margin-bottom: 0.1em;
350}
351
Junio C Hamanobc8d4782014-01-13 23:35:50352div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31353 margin-top: 0;
354 margin-bottom: 0;
355}
356div.toclevel2 {
357 margin-left: 2em;
358 font-size: 0.9em;
359}
360div.toclevel3 {
361 margin-left: 4em;
362 font-size: 0.9em;
363}
364div.toclevel4 {
365 margin-left: 6em;
366 font-size: 0.9em;
367}
Junio C Hamano9d971152012-12-19 00:43:11368
369span.aqua { color: aqua; }
370span.black { color: black; }
371span.blue { color: blue; }
372span.fuchsia { color: fuchsia; }
373span.gray { color: gray; }
374span.green { color: green; }
375span.lime { color: lime; }
376span.maroon { color: maroon; }
377span.navy { color: navy; }
378span.olive { color: olive; }
379span.purple { color: purple; }
380span.red { color: red; }
381span.silver { color: silver; }
382span.teal { color: teal; }
383span.white { color: white; }
384span.yellow { color: yellow; }
385
386span.aqua-background { background: aqua; }
387span.black-background { background: black; }
388span.blue-background { background: blue; }
389span.fuchsia-background { background: fuchsia; }
390span.gray-background { background: gray; }
391span.green-background { background: green; }
392span.lime-background { background: lime; }
393span.maroon-background { background: maroon; }
394span.navy-background { background: navy; }
395span.olive-background { background: olive; }
396span.purple-background { background: purple; }
397span.red-background { background: red; }
398span.silver-background { background: silver; }
399span.teal-background { background: teal; }
400span.white-background { background: white; }
401span.yellow-background { background: yellow; }
402
403span.big { font-size: 2em; }
404span.small { font-size: 0.6em; }
405
406span.underline { text-decoration: underline; }
407span.overline { text-decoration: overline; }
408span.line-through { text-decoration: line-through; }
409
Junio C Hamano9d971152012-12-19 00:43:11410
411/*
412 * xhtml11 specific
413 *
414 * */
415
Junio C Hamanobc8d4782014-01-13 23:35:50416tt {
417 font-family: monospace;
418 font-size: inherit;
419 color: navy;
420}
421
Junio C Hamano9d971152012-12-19 00:43:11422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
Junio C Hamanobc8d4782014-01-13 23:35:50455.monospaced {
456 font-family: monospace;
457 font-size: inherit;
458 color: navy;
459}
460
Junio C Hamano9d971152012-12-19 00:43:11461table.tableblock {
462 margin-top: 1.0em;
463 margin-bottom: 1.5em;
464}
465thead, p.tableblock.header {
466 font-weight: bold;
467 color: #527bbd;
468}
469p.tableblock {
470 margin-top: 0;
471}
472table.tableblock {
473 border-width: 3px;
474 border-spacing: 0px;
475 border-style: solid;
476 border-color: #527bbd;
477 border-collapse: collapse;
478}
479th.tableblock, td.tableblock {
480 border-width: 1px;
481 padding: 4px;
482 border-style: solid;
483 border-color: #527bbd;
484}
485
486table.tableblock.frame-topbot {
487 border-left-style: hidden;
488 border-right-style: hidden;
489}
490table.tableblock.frame-sides {
491 border-top-style: hidden;
492 border-bottom-style: hidden;
493}
494table.tableblock.frame-none {
495 border-style: hidden;
496}
497
498th.tableblock.halign-left, td.tableblock.halign-left {
499 text-align: left;
500}
501th.tableblock.halign-center, td.tableblock.halign-center {
502 text-align: center;
503}
504th.tableblock.halign-right, td.tableblock.halign-right {
505 text-align: right;
506}
507
508th.tableblock.valign-top, td.tableblock.valign-top {
509 vertical-align: top;
510}
511th.tableblock.valign-middle, td.tableblock.valign-middle {
512 vertical-align: middle;
513}
514th.tableblock.valign-bottom, td.tableblock.valign-bottom {
515 vertical-align: bottom;
516}
517
518
519/*
520 * manpage specific
521 *
522 * */
523
524body.manpage h1 {
Junio C Hamano28e6d1f2010-12-08 02:06:14525 padding-top: 0.5em;
526 padding-bottom: 0.5em;
527 border-top: 2px solid silver;
528 border-bottom: 2px solid silver;
529}
Junio C Hamano9d971152012-12-19 00:43:11530body.manpage h2 {
Junio C Hamano28e6d1f2010-12-08 02:06:14531 border-style: none;
532}
Junio C Hamano9d971152012-12-19 00:43:11533body.manpage div.sectionbody {
534 margin-left: 3em;
Junio C Hamano28e6d1f2010-12-08 02:06:14535}
536
537@media print {
Junio C Hamano9d971152012-12-19 00:43:11538 body.manpage div#toc { display: none; }
Junio C Hamano28e6d1f2010-12-08 02:06:14539}
Junio C Hamano34b18112006-02-23 11:21:40540</style>
Junio C Hamano7bd050f2011-09-22 06:32:22541<script type="text/javascript">
542/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22543var asciidoc = { // Namespace.
544
545/////////////////////////////////////////////////////////////////////
546// Table Of Contents generator
547/////////////////////////////////////////////////////////////////////
548
549/* Author: Mihai Bazon, September 2002
550 * http://students.infoiasi.ro/~mishoo
551 *
552 * Table Of Content generator
553 * Version: 0.4
554 *
555 * Feel free to use this script under the terms of the GNU General Public
556 * License, as long as you do not remove or alter this notice.
557 */
558
559 /* modified by Troy D. Hanson, September 2006. License: GPL */
560 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
561
562// toclevels = 1..4.
563toc: function (toclevels) {
564
565 function getText(el) {
566 var text = "";
567 for (var i = el.firstChild; i != null; i = i.nextSibling) {
568 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
569 text += i.data;
570 else if (i.firstChild != null)
571 text += getText(i);
572 }
573 return text;
574 }
575
576 function TocEntry(el, text, toclevel) {
577 this.element = el;
578 this.text = text;
579 this.toclevel = toclevel;
580 }
581
582 function tocEntries(el, toclevels) {
583 var result = new Array;
Junio C Hamanobc8d4782014-01-13 23:35:50584 var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22585 // Function that scans the DOM tree for header elements (the DOM2
586 // nodeIterator API would be a better technique but not supported by all
587 // browsers).
588 var iterate = function (el) {
589 for (var i = el.firstChild; i != null; i = i.nextSibling) {
590 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
591 var mo = re.exec(i.tagName);
592 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
593 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
594 }
595 iterate(i);
596 }
597 }
598 }
599 iterate(el);
600 return result;
601 }
602
603 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11604 if (!toc) {
605 return;
606 }
607
608 // Delete existing TOC entries in case we're reloading the TOC.
609 var tocEntriesToRemove = [];
610 var i;
611 for (i = 0; i < toc.childNodes.length; i++) {
612 var entry = toc.childNodes[i];
Junio C Hamanobc8d4782014-01-13 23:35:50613 if (entry.nodeName == 'div'
Junio C Hamano9d971152012-12-19 00:43:11614 && entry.getAttribute("class")
615 && entry.getAttribute("class").match(/^toclevel/))
616 tocEntriesToRemove.push(entry);
617 }
618 for (i = 0; i < tocEntriesToRemove.length; i++) {
619 toc.removeChild(tocEntriesToRemove[i]);
620 }
621
622 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22623 var entries = tocEntries(document.getElementById("content"), toclevels);
624 for (var i = 0; i < entries.length; ++i) {
625 var entry = entries[i];
626 if (entry.element.id == "")
627 entry.element.id = "_toc_" + i;
628 var a = document.createElement("a");
629 a.href = "#" + entry.element.id;
630 a.appendChild(document.createTextNode(entry.text));
631 var div = document.createElement("div");
632 div.appendChild(a);
633 div.className = "toclevel" + entry.toclevel;
634 toc.appendChild(div);
635 }
636 if (entries.length == 0)
637 toc.parentNode.removeChild(toc);
638},
639
640
641/////////////////////////////////////////////////////////////////////
642// Footnotes generator
643/////////////////////////////////////////////////////////////////////
644
645/* Based on footnote generation code from:
646 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
647 */
648
649footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11650 // Delete existing footnote entries in case we're reloading the footnodes.
651 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22652 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11653 if (!noteholder) {
654 return;
655 }
656 var entriesToRemove = [];
657 for (i = 0; i < noteholder.childNodes.length; i++) {
658 var entry = noteholder.childNodes[i];
Junio C Hamanobc8d4782014-01-13 23:35:50659 if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
Junio C Hamano9d971152012-12-19 00:43:11660 entriesToRemove.push(entry);
661 }
662 for (i = 0; i < entriesToRemove.length; i++) {
663 noteholder.removeChild(entriesToRemove[i]);
664 }
665
666 // Rebuild footnote entries.
667 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22668 var spans = cont.getElementsByTagName("span");
669 var refs = {};
670 var n = 0;
671 for (i=0; i<spans.length; i++) {
672 if (spans[i].className == "footnote") {
673 n++;
Junio C Hamano9d971152012-12-19 00:43:11674 var note = spans[i].getAttribute("data-note");
675 if (!note) {
676 // Use [\s\S] in place of . so multi-line matches work.
677 // Because JavaScript has no s (dotall) regex flag.
678 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
679 spans[i].innerHTML =
680 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
681 "' title='View footnote' class='footnote'>" + n + "</a>]";
682 spans[i].setAttribute("data-note", note);
683 }
Junio C Hamano7bd050f2011-09-22 06:32:22684 noteholder.innerHTML +=
685 "<div class='footnote' id='_footnote_" + n + "'>" +
686 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
687 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22688 var id =spans[i].getAttribute("id");
689 if (id != null) refs["#"+id] = n;
690 }
691 }
692 if (n == 0)
693 noteholder.parentNode.removeChild(noteholder);
694 else {
695 // Process footnoterefs.
696 for (i=0; i<spans.length; i++) {
697 if (spans[i].className == "footnoteref") {
698 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
699 href = href.match(/#.*/)[0]; // Because IE return full URL.
700 n = refs[href];
701 spans[i].innerHTML =
702 "[<a href='#_footnote_" + n +
703 "' title='View footnote' class='footnote'>" + n + "</a>]";
704 }
705 }
706 }
Junio C Hamano9d971152012-12-19 00:43:11707},
708
709install: function(toclevels) {
710 var timerId;
711
712 function reinstall() {
713 asciidoc.footnotes();
714 if (toclevels) {
715 asciidoc.toc(toclevels);
716 }
717 }
718
719 function reinstallAndRemoveTimer() {
720 clearInterval(timerId);
721 reinstall();
722 }
723
724 timerId = setInterval(reinstall, 500);
725 if (document.addEventListener)
726 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
727 else
728 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22729}
730
731}
Junio C Hamano9d971152012-12-19 00:43:11732asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22733/*]]>*/
734</script>
Junio C Hamano34b18112006-02-23 11:21:40735</head>
Junio C Hamano9d971152012-12-19 00:43:11736<body class="manpage">
Junio C Hamano34b18112006-02-23 11:21:40737<div id="header">
738<h1>
739git-rm(1) Manual Page
740</h1>
741<h2>NAME</h2>
742<div class="sectionbody">
743<p>git-rm -
Junio C Hamano01078922006-03-10 00:31:47744 Remove files from the working tree and from the index
Junio C Hamano34b18112006-02-23 11:21:40745</p>
746</div>
747</div>
Junio C Hamano7bd050f2011-09-22 06:32:22748<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11749<div class="sect1">
Junio C Hamano28e6d1f2010-12-08 02:06:14750<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano34b18112006-02-23 11:21:40751<div class="sectionbody">
Junio C Hamano15567bc2011-07-23 00:51:59752<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11753<pre class="content"><em>git rm</em> [-f | --force] [-n] [-r] [--cached] [--ignore-unmatch] [--quiet] [--] &lt;file&gt;&#8230;</pre>
754<div class="attribution">
Junio C Hamano15567bc2011-07-23 00:51:59755</div></div>
Junio C Hamano34b18112006-02-23 11:21:40756</div>
Junio C Hamano9d971152012-12-19 00:43:11757</div>
758<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31759<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano34b18112006-02-23 11:21:40760<div class="sectionbody">
Junio C Hamano28e6d1f2010-12-08 02:06:14761<div class="paragraph"><p>Remove files from the index, or from the working tree and the index.
Junio C Hamanobc8d4782014-01-13 23:35:50762<tt>git rm</tt> will not remove a file from just your working directory.
Junio C Hamanoae05fee2010-01-08 07:39:46763(There is no option to remove a file only from the working tree
Junio C Hamanobc8d4782014-01-13 23:35:50764and yet keep it in the index; use <tt>/bin/rm</tt> if you want to do that.)
Junio C Hamano2ec4d362008-04-17 02:17:53765The files being removed have to be identical to the tip of the branch,
766and no updates to their contents can be staged in the index,
Junio C Hamanobc8d4782014-01-13 23:35:50767though that default behavior can be overridden with the <tt>-f</tt> option.
768When <tt>--cached</tt> is given, the staged content has to
Junio C Hamano2ec4d362008-04-17 02:17:53769match either the tip of the branch or the file on disk,
Junio C Hamanoba4b9282008-07-06 05:20:31770allowing the file to be removed from just the index.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40771</div>
Junio C Hamano9d971152012-12-19 00:43:11772</div>
773<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31774<h2 id="_options">OPTIONS</h2>
Junio C Hamano34b18112006-02-23 11:21:40775<div class="sectionbody">
Junio C Hamano28e6d1f2010-12-08 02:06:14776<div class="dlist"><dl>
777<dt class="hdlist1">
Junio C Hamano34b18112006-02-23 11:21:40778&lt;file&gt;&#8230;
779</dt>
780<dd>
781<p>
Junio C Hamanobc8d4782014-01-13 23:35:50782 Files to remove. Fileglobs (e.g. <tt>*.c</tt>) can be given to
Junio C Hamano076ffcc2013-02-06 05:13:21783 remove all matching files. If you want Git to expand
Junio C Hamano2ec4d362008-04-17 02:17:53784 file glob characters, you may need to shell-escape them.
785 A leading directory name
Junio C Hamanobc8d4782014-01-13 23:35:50786 (e.g. <tt>dir</tt> to remove <tt>dir/file1</tt> and <tt>dir/file2</tt>) can be
Junio C Hamano2ec4d362008-04-17 02:17:53787 given to remove all files in the directory, and recursively
788 all sub-directories,
Junio C Hamanobc8d4782014-01-13 23:35:50789 but this requires the <tt>-r</tt> option to be explicitly given.
Junio C Hamano34b18112006-02-23 11:21:40790</p>
791</dd>
Junio C Hamano28e6d1f2010-12-08 02:06:14792<dt class="hdlist1">
Junio C Hamano34b18112006-02-23 11:21:40793-f
794</dt>
Junio C Hamano28e6d1f2010-12-08 02:06:14795<dt class="hdlist1">
Junio C Hamanofaa1e502008-08-10 03:55:58796--force
797</dt>
Junio C Hamano34b18112006-02-23 11:21:40798<dd>
799<p>
Junio C Hamano3d2adc72006-12-26 03:21:45800 Override the up-to-date check.
Junio C Hamano34b18112006-02-23 11:21:40801</p>
802</dd>
Junio C Hamano28e6d1f2010-12-08 02:06:14803<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47804-n
805</dt>
Junio C Hamano28e6d1f2010-12-08 02:06:14806<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47807--dry-run
Junio C Hamano34b18112006-02-23 11:21:40808</dt>
809<dd>
810<p>
Junio C Hamano28e6d1f2010-12-08 02:06:14811 Don&#8217;t actually remove any file(s). Instead, just show
Junio C Hamano2ec4d362008-04-17 02:17:53812 if they exist in the index and would otherwise be removed
813 by the command.
Junio C Hamano34b18112006-02-23 11:21:40814</p>
815</dd>
Junio C Hamano28e6d1f2010-12-08 02:06:14816<dt class="hdlist1">
Junio C Hamano3d2adc72006-12-26 03:21:45817-r
Junio C Hamano34b18112006-02-23 11:21:40818</dt>
819<dd>
820<p>
Junio C Hamano3d2adc72006-12-26 03:21:45821 Allow recursive removal when a leading directory name is
822 given.
Junio C Hamano34b18112006-02-23 11:21:40823</p>
824</dd>
Junio C Hamano28e6d1f2010-12-08 02:06:14825<dt class="hdlist1">
Junio C Hamano1bb569e2006-05-05 23:14:25826--
Junio C Hamano34b18112006-02-23 11:21:40827</dt>
828<dd>
829<p>
830 This option can be used to separate command-line options from
831 the list of files, (useful when filenames might be mistaken
832 for command-line options).
833</p>
834</dd>
Junio C Hamano28e6d1f2010-12-08 02:06:14835<dt class="hdlist1">
Junio C Hamano3d2adc72006-12-26 03:21:45836--cached
837</dt>
838<dd>
839<p>
Junio C Hamano2ec4d362008-04-17 02:17:53840 Use this option to unstage and remove paths only from the index.
841 Working tree files, whether modified or not, will be
842 left alone.
Junio C Hamano3d2adc72006-12-26 03:21:45843</p>
844</dd>
Junio C Hamano28e6d1f2010-12-08 02:06:14845<dt class="hdlist1">
Junio C Hamano28cea6a2007-04-18 04:57:17846--ignore-unmatch
847</dt>
848<dd>
849<p>
850 Exit with a zero status even if no files matched.
851</p>
852</dd>
Junio C Hamano28e6d1f2010-12-08 02:06:14853<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47854-q
855</dt>
Junio C Hamano28e6d1f2010-12-08 02:06:14856<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:47857--quiet
Junio C Hamano0e3cb532007-04-17 08:28:11858</dt>
859<dd>
860<p>
Junio C Hamanobc8d4782014-01-13 23:35:50861 <tt>git rm</tt> normally outputs one line (in the form of an <tt>rm</tt> command)
Junio C Hamano0e3cb532007-04-17 08:28:11862 for each file removed. This option suppresses that output.
863</p>
864</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31865</dl></div>
Junio C Hamano34b18112006-02-23 11:21:40866</div>
Junio C Hamano9d971152012-12-19 00:43:11867</div>
868<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31869<h2 id="_discussion">DISCUSSION</h2>
Junio C Hamano34b18112006-02-23 11:21:40870<div class="sectionbody">
Junio C Hamano28e6d1f2010-12-08 02:06:14871<div class="paragraph"><p>The &lt;file&gt; list given to the command can be exact pathnames,
Junio C Hamano2ec4d362008-04-17 02:17:53872file glob patterns, or leading directory names. The command
Junio C Hamano076ffcc2013-02-06 05:13:21873removes only the paths that are known to Git. Giving the name of
874a file that you have not told Git about does not remove that file.</p></div>
Junio C Hamano28e6d1f2010-12-08 02:06:14875<div class="paragraph"><p>File globbing matches across directory boundaries. Thus, given
Junio C Hamanobc8d4782014-01-13 23:35:50876two directories <tt>d</tt> and <tt>d2</tt>, there is a difference between
877using <tt>git rm 'd*'</tt> and <tt>git rm 'd/*'</tt>, as the former will
878also remove all of directory <tt>d2</tt>.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40879</div>
Junio C Hamano9d971152012-12-19 00:43:11880</div>
881<div class="sect1">
Junio C Hamanoae05fee2010-01-08 07:39:46882<h2 id="_removing_files_that_have_disappeared_from_the_filesystem">REMOVING FILES THAT HAVE DISAPPEARED FROM THE FILESYSTEM</h2>
883<div class="sectionbody">
Junio C Hamanobc8d4782014-01-13 23:35:50884<div class="paragraph"><p>There is no option for <tt>git rm</tt> to remove from the index only
Junio C Hamanoae05fee2010-01-08 07:39:46885the paths that have disappeared from the filesystem. However,
886depending on the use case, there are several ways that can be
887done.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11888<div class="sect2">
889<h3 id="_using_8220_git_commit_a_8221">Using &#8220;git commit -a&#8221;</h3>
Junio C Hamano28e6d1f2010-12-08 02:06:14890<div class="paragraph"><p>If you intend that your next commit should record all modifications
Junio C Hamanoae05fee2010-01-08 07:39:46891of tracked files in the working tree and record all removals of
Junio C Hamanobc8d4782014-01-13 23:35:50892files that have been removed from the working tree with <tt>rm</tt>
893(as opposed to <tt>git rm</tt>), use <tt>git commit -a</tt>, as it will
Junio C Hamanoae05fee2010-01-08 07:39:46894automatically notice and record all removals. You can also have a
Junio C Hamanobc8d4782014-01-13 23:35:50895similar effect without committing by using <tt>git add -u</tt>.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11896</div>
897<div class="sect2">
898<h3 id="_using_8220_git_add_a_8221">Using &#8220;git add -A&#8221;</h3>
Junio C Hamano28e6d1f2010-12-08 02:06:14899<div class="paragraph"><p>When accepting a new code drop for a vendor branch, you probably
Junio C Hamanoae05fee2010-01-08 07:39:46900want to record both the removal of paths and additions of new paths
901as well as modifications of existing paths.</p></div>
Junio C Hamano28e6d1f2010-12-08 02:06:14902<div class="paragraph"><p>Typically you would first remove all tracked files from the working
Junio C Hamanoae05fee2010-01-08 07:39:46903tree using this command:</p></div>
904<div class="listingblock">
905<div class="content">
Junio C Hamanobc8d4782014-01-13 23:35:50906<pre><tt>git ls-files -z | xargs -0 rm -f</tt></pre>
Junio C Hamanoae05fee2010-01-08 07:39:46907</div></div>
Junio C Hamano28e6d1f2010-12-08 02:06:14908<div class="paragraph"><p>and then untar the new code in the working tree. Alternately
909you could <em>rsync</em> the changes into the working tree.</p></div>
910<div class="paragraph"><p>After that, the easiest way to record all removals, additions, and
Junio C Hamanoae05fee2010-01-08 07:39:46911modifications in the working tree is:</p></div>
912<div class="listingblock">
913<div class="content">
Junio C Hamanobc8d4782014-01-13 23:35:50914<pre><tt>git add -A</tt></pre>
Junio C Hamanoae05fee2010-01-08 07:39:46915</div></div>
Junio C Hamanoa28a9202012-06-21 07:08:23916<div class="paragraph"><p>See <a href="git-add.html">git-add(1)</a>.</p></div>
Junio C Hamano9d971152012-12-19 00:43:11917</div>
918<div class="sect2">
919<h3 id="_other_ways">Other ways</h3>
Junio C Hamano28e6d1f2010-12-08 02:06:14920<div class="paragraph"><p>If all you really want to do is to remove from the index the files
Junio C Hamanoae05fee2010-01-08 07:39:46921that are no longer present in the working tree (perhaps because
Junio C Hamanobc8d4782014-01-13 23:35:50922your working tree is dirty so that you cannot use <tt>git commit -a</tt>),
Junio C Hamanoae05fee2010-01-08 07:39:46923use the following command:</p></div>
924<div class="listingblock">
925<div class="content">
Junio C Hamanobc8d4782014-01-13 23:35:50926<pre><tt>git diff --name-only --diff-filter=D -z | xargs -0 git rm --cached</tt></pre>
Junio C Hamanoae05fee2010-01-08 07:39:46927</div></div>
Junio C Hamano9d971152012-12-19 00:43:11928</div>
Junio C Hamano8eac2682013-09-09 22:35:20929</div>
930</div>
931<div class="sect1">
932<h2 id="_submodules">SUBMODULES</h2>
933<div class="sectionbody">
Junio C Hamanof2b74942012-11-20 21:06:26934<div class="paragraph"><p>Only submodules using a gitfile (which means they were cloned
Junio C Hamano076ffcc2013-02-06 05:13:21935with a Git version 1.7.8 or newer) will be removed from the work
Junio C Hamanof2b74942012-11-20 21:06:26936tree, as their repository lives inside the .git directory of the
937superproject. If a submodule (or one of those nested inside it)
Junio C Hamanobc8d4782014-01-13 23:35:50938still uses a .git directory, <tt>git rm</tt> will fail - no matter if forced
Junio C Hamano8eac2682013-09-09 22:35:20939or not - to protect the submodule&#8217;s history. If it exists the
940submodule.&lt;name&gt; section in the <a href="gitmodules.html">gitmodules(5)</a> file will also
941be removed and that file will be staged (unless --cached or -n are used).</p></div>
Junio C Hamanof2b74942012-11-20 21:06:26942<div class="paragraph"><p>A submodule is considered up-to-date when the HEAD is the same as
943recorded in the index, no tracked files are modified and no untracked
944files that aren&#8217;t ignored are present in the submodules work tree.
945Ignored files are deemed expendable and won&#8217;t stop a submodule&#8217;s work
946tree from being removed.</p></div>
Junio C Hamano240dc3f2013-03-25 23:37:03947<div class="paragraph"><p>If you only want to remove the local checkout of a submodule from your
948work tree without committing the removal,
Junio C Hamanobc8d4782014-01-13 23:35:50949use <a href="git-submodule.html">git-submodule(1)</a> <tt>deinit</tt> instead.</p></div>
Junio C Hamanoae05fee2010-01-08 07:39:46950</div>
Junio C Hamano9d971152012-12-19 00:43:11951</div>
Junio C Hamano9d971152012-12-19 00:43:11952<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31953<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano34b18112006-02-23 11:21:40954<div class="sectionbody">
Junio C Hamano28e6d1f2010-12-08 02:06:14955<div class="dlist"><dl>
956<dt class="hdlist1">
Junio C Hamanobc8d4782014-01-13 23:35:50957<tt>git rm Documentation/\*.txt</tt>
Junio C Hamano34b18112006-02-23 11:21:40958</dt>
959<dd>
960<p>
Junio C Hamanobc8d4782014-01-13 23:35:50961 Removes all <tt>*.txt</tt> files from the index that are under the
962 <tt>Documentation</tt> directory and any of its subdirectories.
Junio C Hamano34b18112006-02-23 11:21:40963</p>
Junio C Hamanobc8d4782014-01-13 23:35:50964<div class="paragraph"><p>Note that the asterisk <tt>*</tt> is quoted from the shell in this
Junio C Hamano076ffcc2013-02-06 05:13:21965example; this lets Git, and not the shell, expand the pathnames
Junio C Hamanobc8d4782014-01-13 23:35:50966of files and subdirectories under the <tt>Documentation/</tt> directory.</p></div>
Junio C Hamano34b18112006-02-23 11:21:40967</dd>
Junio C Hamano28e6d1f2010-12-08 02:06:14968<dt class="hdlist1">
Junio C Hamanobc8d4782014-01-13 23:35:50969<tt>git rm -f git-*.sh</tt>
Junio C Hamano34b18112006-02-23 11:21:40970</dt>
971<dd>
972<p>
Junio C Hamano1ce39ab2007-01-16 22:05:10973 Because this example lets the shell expand the asterisk
974 (i.e. you are listing the files explicitly), it
Junio C Hamanobc8d4782014-01-13 23:35:50975 does not remove <tt>subdir/git-foo.sh</tt>.
Junio C Hamano34b18112006-02-23 11:21:40976</p>
977</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31978</dl></div>
Junio C Hamano34b18112006-02-23 11:21:40979</div>
Junio C Hamano9d971152012-12-19 00:43:11980</div>
981<div class="sect1">
Junio C Hamanobc8d4782014-01-13 23:35:50982<h2 id="_bugs">BUGS</h2>
983<div class="sectionbody">
984<div class="paragraph"><p>Each time a superproject update removes a populated submodule
985(e.g. when switching between commits before and after the removal) a
986stale submodule checkout will remain in the old location. Removing the
987old directory is only safe when it uses a gitfile, as otherwise the
988history of the submodule will be deleted too. This step will be
989obsolete when recursive submodule update has been implemented.</p></div>
990</div>
991</div>
992<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31993<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamano2bb13102006-03-06 07:10:21994<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:23995<div class="paragraph"><p><a href="git-add.html">git-add(1)</a></p></div>
Junio C Hamano2bb13102006-03-06 07:10:21996</div>
Junio C Hamano9d971152012-12-19 00:43:11997</div>
998<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31999<h2 id="_git">GIT</h2>
Junio C Hamano34b18112006-02-23 11:21:401000<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231001<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano34b18112006-02-23 11:21:401002</div>
Junio C Hamano7bd050f2011-09-22 06:32:221003</div>
Junio C Hamano9d971152012-12-19 00:43:111004</div>
Junio C Hamano7bd050f2011-09-22 06:32:221005<div id="footnotes"><hr /></div>
Junio C Hamano34b18112006-02-23 11:21:401006<div id="footer">
1007<div id="footer-text">
Junio C Hamanobc8d4782014-01-13 23:35:501008Last updated 2014-01-13 15:35:15 PST
Junio C Hamano34b18112006-02-23 11:21:401009</div>
1010</div>
1011</body>
1012</html>