blob: 4203adea771811763caccf1e49a5002765f7d132 [file] [log] [blame]
Junio C Hamano944ce252018-05-30 22:25:261<?xml version="1.0" encoding="UTF-8"?>
Junio C Hamano679d22d2007-06-02 21:13:442<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5<head>
Junio C Hamano9d971152012-12-19 00:43:116<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
Junio C Hamanoa85030a2022-07-27 16:48:217<meta name="generator" content="AsciiDoc 10.2.0" />
Junio C Hamano2e6ded82010-12-05 06:20:488<title>gitignore(5)</title>
Junio C Hamano679d22d2007-06-02 21:13:449<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:1110/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
11
12/* Default font. */
13body {
14 font-family: Georgia,serif;
15}
16
17/* Title font. */
18h1, h2, h3, h4, h5, h6,
19div.title, caption.title,
20thead, p.table.header,
21#toctitle,
22#author, #revnumber, #revdate, #revremark,
23#footer {
24 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano679d22d2007-06-02 21:13:4425}
26
27body {
28 margin: 1em 5% 1em 5%;
29}
30
Junio C Hamanoba4b9282008-07-06 05:20:3131a {
32 color: blue;
33 text-decoration: underline;
34}
35a:visited {
36 color: fuchsia;
37}
Junio C Hamano679d22d2007-06-02 21:13:4438
39em {
40 font-style: italic;
Junio C Hamano2e6ded82010-12-05 06:20:4841 color: navy;
Junio C Hamano679d22d2007-06-02 21:13:4442}
43
44strong {
45 font-weight: bold;
Junio C Hamano2e6ded82010-12-05 06:20:4846 color: #083194;
Junio C Hamano679d22d2007-06-02 21:13:4447}
48
Junio C Hamano679d22d2007-06-02 21:13:4449h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
Junio C Hamano679d22d2007-06-02 21:13:4451 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
54}
55
Junio C Hamanoba4b9282008-07-06 05:20:3156h1, h2, h3 {
Junio C Hamano679d22d2007-06-02 21:13:4457 border-bottom: 2px solid silver;
58}
59h2 {
Junio C Hamano679d22d2007-06-02 21:13:4460 padding-top: 0.5em;
61}
Junio C Hamanoba4b9282008-07-06 05:20:3162h3 {
63 float: left;
64}
65h3 + * {
66 clear: left;
67}
Junio C Hamano9d971152012-12-19 00:43:1168h5 {
69 font-size: 1.0em;
70}
Junio C Hamano679d22d2007-06-02 21:13:4471
72div.sectionbody {
Junio C Hamano679d22d2007-06-02 21:13:4473 margin-left: 0;
74}
75
76hr {
77 border: 1px solid silver;
78}
79
80p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
83}
84
Junio C Hamano2e6ded82010-12-05 06:20:4885ul, ol, li > p {
86 margin-top: 0;
87}
Junio C Hamano9d971152012-12-19 00:43:1188ul > li { color: #aaa; }
89ul > li > * { color: black; }
Junio C Hamano2e6ded82010-12-05 06:20:4890
Junio C Hamanoc14e6ad2014-10-31 20:25:5391.monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
Junio C Hamano679d22d2007-06-02 21:13:4495 padding: 0;
96 margin: 0;
97}
Junio C Hamanoc14e6ad2014-10-31 20:25:5398pre {
99 white-space: pre-wrap;
100}
Junio C Hamano679d22d2007-06-02 21:13:44101
Junio C Hamano9d971152012-12-19 00:43:11102#author {
Junio C Hamano679d22d2007-06-02 21:13:44103 color: #527bbd;
Junio C Hamano679d22d2007-06-02 21:13:44104 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31105 font-size: 1.1em;
Junio C Hamano679d22d2007-06-02 21:13:44106}
Junio C Hamano9d971152012-12-19 00:43:11107#email {
Junio C Hamano679d22d2007-06-02 21:13:44108}
Junio C Hamano9d971152012-12-19 00:43:11109#revnumber, #revdate, #revremark {
Junio C Hamano679d22d2007-06-02 21:13:44110}
111
Junio C Hamano9d971152012-12-19 00:43:11112#footer {
Junio C Hamano679d22d2007-06-02 21:13:44113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
117}
Junio C Hamano9d971152012-12-19 00:43:11118#footer-text {
Junio C Hamano679d22d2007-06-02 21:13:44119 float: left;
120 padding-bottom: 0.5em;
121}
Junio C Hamano9d971152012-12-19 00:43:11122#footer-badges {
Junio C Hamano679d22d2007-06-02 21:13:44123 float: right;
124 padding-bottom: 0.5em;
125}
126
Junio C Hamano9d971152012-12-19 00:43:11127#preamble {
Junio C Hamano2e6ded82010-12-05 06:20:48128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
130}
Junio C Hamano9d971152012-12-19 00:43:11131div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano679d22d2007-06-02 21:13:44132div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22134 margin-top: 1.0em;
Junio C Hamano679d22d2007-06-02 21:13:44135 margin-bottom: 1.5em;
136}
137div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
Junio C Hamano679d22d2007-06-02 21:13:44142}
143
144div.content { /* Block element content. */
145 padding: 0;
146}
147
148/* Block element titles. */
149div.title, caption.title {
Junio C Hamano2e6ded82010-12-05 06:20:48150 color: #527bbd;
Junio C Hamano679d22d2007-06-02 21:13:44151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
155}
156div.title + * {
157 margin-top: 0;
158}
159
160td div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content div.title:first-child {
164 margin-top: 0.0em;
165}
166div.content + div.title {
167 margin-top: 0.0em;
168}
169
170div.sidebarblock > div.content {
171 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
Junio C Hamano679d22d2007-06-02 21:13:44174 padding: 0.5em;
175}
176
177div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
Junio C Hamano679d22d2007-06-02 21:13:44181 padding: 0.5em;
182}
183
Junio C Hamano7bd050f2011-09-22 06:32:22184div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
Junio C Hamano2e6ded82010-12-05 06:20:48187 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11188 border-left: 5px solid #f0f0f0;
189 color: #888;
Junio C Hamano679d22d2007-06-02 21:13:44190}
Junio C Hamano7bd050f2011-09-22 06:32:22191
Junio C Hamano2e6ded82010-12-05 06:20:48192div.quoteblock > div.attribution {
193 padding-top: 0.5em;
Junio C Hamano679d22d2007-06-02 21:13:44194 text-align: right;
195}
Junio C Hamano2e6ded82010-12-05 06:20:48196
Junio C Hamano9d971152012-12-19 00:43:11197div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
Junio C Hamano2e6ded82010-12-05 06:20:48200}
201div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
204}
205/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31206div.verseblock + div.attribution {
207 text-align: left;
208}
Junio C Hamano679d22d2007-06-02 21:13:44209
210div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
217}
218div.admonitionblock td.content {
219 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22220 border-left: 3px solid #dddddd;
Junio C Hamano679d22d2007-06-02 21:13:44221}
222
223div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
Junio C Hamano679d22d2007-06-02 21:13:44226}
227
Junio C Hamano679d22d2007-06-02 21:13:44228div.imageblock div.content { padding-left: 0; }
Junio C Hamanoc14e6ad2014-10-31 20:25:53229span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamano2e6ded82010-12-05 06:20:48230a.image:visited { color: white; }
Junio C Hamano679d22d2007-06-02 21:13:44231
232dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
235}
236dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
Junio C Hamano2e6ded82010-12-05 06:20:48239 font-style: normal;
240 color: navy;
Junio C Hamano679d22d2007-06-02 21:13:44241}
242dd > *:first-child {
Junio C Hamano2e6ded82010-12-05 06:20:48243 margin-top: 0.1em;
Junio C Hamano679d22d2007-06-02 21:13:44244}
245
246ul, ol {
247 list-style-position: outside;
248}
Junio C Hamano2e6ded82010-12-05 06:20:48249ol.arabic {
250 list-style-type: decimal;
251}
252ol.loweralpha {
Junio C Hamano679d22d2007-06-02 21:13:44253 list-style-type: lower-alpha;
254}
Junio C Hamano2e6ded82010-12-05 06:20:48255ol.upperalpha {
256 list-style-type: upper-alpha;
257}
258ol.lowerroman {
259 list-style-type: lower-roman;
260}
261ol.upperroman {
262 list-style-type: upper-roman;
263}
264
265div.compact ul, div.compact ol,
266div.compact p, div.compact p,
267div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
270}
Junio C Hamano679d22d2007-06-02 21:13:44271
Junio C Hamano679d22d2007-06-02 21:13:44272tfoot {
273 font-weight: bold;
274}
Junio C Hamano2e6ded82010-12-05 06:20:48275td > div.verse {
276 white-space: pre;
277}
Junio C Hamano2e6ded82010-12-05 06:20:48278
279div.hdlist {
Junio C Hamano679d22d2007-06-02 21:13:44280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
282}
Junio C Hamano2e6ded82010-12-05 06:20:48283div.hdlist tr {
284 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31285}
Junio C Hamano2e6ded82010-12-05 06:20:48286dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
288}
289td.hdlist1 {
Junio C Hamano679d22d2007-06-02 21:13:44290 vertical-align: top;
Junio C Hamano2e6ded82010-12-05 06:20:48291 font-style: normal;
Junio C Hamano679d22d2007-06-02 21:13:44292 padding-right: 0.8em;
Junio C Hamano2e6ded82010-12-05 06:20:48293 color: navy;
Junio C Hamano679d22d2007-06-02 21:13:44294}
Junio C Hamano2e6ded82010-12-05 06:20:48295td.hdlist2 {
Junio C Hamano679d22d2007-06-02 21:13:44296 vertical-align: top;
297}
Junio C Hamano2e6ded82010-12-05 06:20:48298div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
301}
302
303.comment {
304 background: yellow;
305}
Junio C Hamano679d22d2007-06-02 21:13:44306
Junio C Hamano7bd050f2011-09-22 06:32:22307.footnote, .footnoteref {
308 font-size: 0.8em;
309}
310
311span.footnote, span.footnoteref {
312 vertical-align: super;
313}
314
315#footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
318}
319
320#footnotes div.footnote {
321 margin: 0 0 5px 0;
322}
323
324#footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
332}
333
Junio C Hamano9d971152012-12-19 00:43:11334div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
338}
339div.colist td img {
340 margin-top: 0.3em;
Junio C Hamano679d22d2007-06-02 21:13:44341}
Junio C Hamanoba4b9282008-07-06 05:20:31342
Junio C Hamano9d971152012-12-19 00:43:11343@media print {
344 #footer-badges { display: none; }
345}
346
347#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22348 margin-bottom: 2.5em;
349}
350
Junio C Hamano9d971152012-12-19 00:43:11351#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31352 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
357}
358
Junio C Hamanoc14e6ad2014-10-31 20:25:53359div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31360 margin-top: 0;
361 margin-bottom: 0;
362}
363div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
366}
367div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
370}
371div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
374}
Junio C Hamano9d971152012-12-19 00:43:11375
376span.aqua { color: aqua; }
377span.black { color: black; }
378span.blue { color: blue; }
379span.fuchsia { color: fuchsia; }
380span.gray { color: gray; }
381span.green { color: green; }
382span.lime { color: lime; }
383span.maroon { color: maroon; }
384span.navy { color: navy; }
385span.olive { color: olive; }
386span.purple { color: purple; }
387span.red { color: red; }
388span.silver { color: silver; }
389span.teal { color: teal; }
390span.white { color: white; }
391span.yellow { color: yellow; }
392
393span.aqua-background { background: aqua; }
394span.black-background { background: black; }
395span.blue-background { background: blue; }
396span.fuchsia-background { background: fuchsia; }
397span.gray-background { background: gray; }
398span.green-background { background: green; }
399span.lime-background { background: lime; }
400span.maroon-background { background: maroon; }
401span.navy-background { background: navy; }
402span.olive-background { background: olive; }
403span.purple-background { background: purple; }
404span.red-background { background: red; }
405span.silver-background { background: silver; }
406span.teal-background { background: teal; }
407span.white-background { background: white; }
408span.yellow-background { background: yellow; }
409
410span.big { font-size: 2em; }
411span.small { font-size: 0.6em; }
412
413span.underline { text-decoration: underline; }
414span.overline { text-decoration: overline; }
415span.line-through { text-decoration: line-through; }
416
Junio C Hamanoc14e6ad2014-10-31 20:25:53417div.unbreakable { page-break-inside: avoid; }
418
Junio C Hamano9d971152012-12-19 00:43:11419
420/*
421 * xhtml11 specific
422 *
423 * */
424
425div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
428}
429div.tableblock > table {
430 border: 3px solid #527bbd;
431}
432thead, p.table.header {
433 font-weight: bold;
434 color: #527bbd;
435}
436p.table {
437 margin-top: 0;
438}
Junio C Hamano725b0da2020-01-22 22:02:40439/* Because the table frame attribute is overridden by CSS in most browsers. */
Junio C Hamano9d971152012-12-19 00:43:11440div.tableblock > table[frame="void"] {
441 border-style: none;
442}
443div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
446}
447div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
450}
451
452
453/*
454 * html5 specific
455 *
456 * */
457
458table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
461}
462thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
465}
466p.tableblock {
467 margin-top: 0;
468}
469table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
475}
476th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
481}
482
483table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
486}
487table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
490}
491table.tableblock.frame-none {
492 border-style: hidden;
493}
494
495th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
497}
498th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
500}
501th.tableblock.halign-right, td.tableblock.halign-right {
502 text-align: right;
503}
504
505th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
507}
508th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
510}
511th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
513}
514
515
516/*
517 * manpage specific
518 *
519 * */
520
521body.manpage h1 {
Junio C Hamano2e6ded82010-12-05 06:20:48522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage h2 {
Junio C Hamano2e6ded82010-12-05 06:20:48528 border-style: none;
529}
Junio C Hamano9d971152012-12-19 00:43:11530body.manpage div.sectionbody {
531 margin-left: 3em;
Junio C Hamano2e6ded82010-12-05 06:20:48532}
533
534@media print {
Junio C Hamano9d971152012-12-19 00:43:11535 body.manpage div#toc { display: none; }
Junio C Hamano2e6ded82010-12-05 06:20:48536}
Junio C Hamanoc14e6ad2014-10-31 20:25:53537
538
Junio C Hamano679d22d2007-06-02 21:13:44539</style>
Junio C Hamano7bd050f2011-09-22 06:32:22540<script type="text/javascript">
541/*<![CDATA[*/
Junio C Hamano2b153182021-12-15 21:00:31542var asciidoc = { // Namespace.
543
544/////////////////////////////////////////////////////////////////////
545// Table Of Contents generator
546/////////////////////////////////////////////////////////////////////
547
548/* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
550 *
551 * Table Of Content generator
552 * Version: 0.4
553 *
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
556 */
557
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
560
561// toclevels = 1..4.
562toc: function (toclevels) {
563
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
571 }
572 return text;
573 }
574
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
579 }
580
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
593 }
594 iterate(i);
595 }
596 }
597 }
598 iterate(el);
599 return result;
600 }
601
602 var toc = document.getElementById("toc");
603 if (!toc) {
604 return;
605 }
606
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
616 }
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
619 }
620
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
634 }
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
637},
638
639
640/////////////////////////////////////////////////////////////////////
641// Footnotes generator
642/////////////////////////////////////////////////////////////////////
643
644/* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
646 */
647
648footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
651 var noteholder = document.getElementById("footnotes");
652 if (!noteholder) {
653 return;
654 }
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
659 entriesToRemove.push(entry);
660 }
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
663 }
664
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
682 }
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
689 }
690 }
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
703 }
704 }
705 }
706},
707
708install: function(toclevels) {
709 var timerId;
710
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
715 }
716 }
717
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
721 }
722
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
728}
729
730}
Junio C Hamano9d971152012-12-19 00:43:11731asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22732/*]]>*/
733</script>
Junio C Hamano679d22d2007-06-02 21:13:44734</head>
Junio C Hamano9d971152012-12-19 00:43:11735<body class="manpage">
Junio C Hamano679d22d2007-06-02 21:13:44736<div id="header">
737<h1>
738gitignore(5) Manual Page
739</h1>
740<h2>NAME</h2>
741<div class="sectionbody">
742<p>gitignore -
743 Specifies intentionally untracked files to ignore
744</p>
745</div>
746</div>
Junio C Hamano7bd050f2011-09-22 06:32:22747<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11748<div class="sect1">
Junio C Hamano2e6ded82010-12-05 06:20:48749<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano679d22d2007-06-02 21:13:44750<div class="sectionbody">
Junio C Hamanoea1ac8d2018-07-18 20:16:48751<div class="paragraph"><p>$XDG_CONFIG_HOME/git/ignore, $GIT_DIR/info/exclude, .gitignore</p></div>
Junio C Hamano679d22d2007-06-02 21:13:44752</div>
Junio C Hamano9d971152012-12-19 00:43:11753</div>
754<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31755<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano679d22d2007-06-02 21:13:44756<div class="sectionbody">
Junio C Hamanoc14e6ad2014-10-31 20:25:53757<div class="paragraph"><p>A <code>gitignore</code> file specifies intentionally untracked files that
Junio C Hamano076ffcc2013-02-06 05:13:21758Git should ignore.
759Files already tracked by Git are not affected; see the NOTES
Junio C Hamano2e6ded82010-12-05 06:20:48760below for details.</p></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:53761<div class="paragraph"><p>Each line in a <code>gitignore</code> file specifies a pattern.
Junio C Hamano076ffcc2013-02-06 05:13:21762When deciding whether to ignore a path, Git normally checks
Junio C Hamanoc14e6ad2014-10-31 20:25:53763<code>gitignore</code> patterns from multiple sources, with the following
Junio C Hamanode9879a2007-07-22 09:33:42764order of precedence, from highest to lowest (within one level of
Junio C Hamanoba4b9282008-07-06 05:20:31765precedence, the last matching pattern decides the outcome):</p></div>
Junio C Hamano2e6ded82010-12-05 06:20:48766<div class="ulist"><ul>
Junio C Hamano679d22d2007-06-02 21:13:44767<li>
768<p>
Junio C Hamanode9879a2007-07-22 09:33:42769Patterns read from the command line for those commands that support
770 them.
771</p>
772</li>
773<li>
774<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:53775Patterns read from a <code>.gitignore</code> file in the same directory
Junio C Hamano20cf4932021-07-28 21:02:52776 as the path, or in any parent directory (up to the top-level of the working
777 tree), with patterns in the higher level files being overridden by those in
778 lower level files down to the directory containing the file. These patterns
779 match relative to the location of the <code>.gitignore</code> file. A project normally
780 includes such <code>.gitignore</code> files in its repository, containing patterns for
Junio C Hamanode9879a2007-07-22 09:33:42781 files generated as part of the project build.
Junio C Hamano679d22d2007-06-02 21:13:44782</p>
783</li>
784<li>
785<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:53786Patterns read from <code>$GIT_DIR/info/exclude</code>.
Junio C Hamano679d22d2007-06-02 21:13:44787</p>
788</li>
789<li>
790<p>
Junio C Hamanode9879a2007-07-22 09:33:42791Patterns read from the file specified by the configuration
Junio C Hamano042f2142016-06-27 18:05:05792 variable <code>core.excludesFile</code>.
Junio C Hamano679d22d2007-06-02 21:13:44793</p>
794</li>
Junio C Hamanoba4b9282008-07-06 05:20:31795</ul></div>
Junio C Hamano2e6ded82010-12-05 06:20:48796<div class="paragraph"><p>Which file to place a pattern in depends on how the pattern is meant to
Junio C Hamano4f07aec2012-09-25 19:08:44797be used.</p></div>
798<div class="ulist"><ul>
799<li>
800<p>
801Patterns which should be version-controlled and distributed to
802 other repositories via clone (i.e., files that all developers will want
Junio C Hamanoc14e6ad2014-10-31 20:25:53803 to ignore) should go into a <code>.gitignore</code> file.
Junio C Hamano4f07aec2012-09-25 19:08:44804</p>
805</li>
806<li>
807<p>
808Patterns which are
809 specific to a particular repository but which do not need to be shared
810 with other related repositories (e.g., auxiliary files that live inside
811 the repository but are specific to one user&#8217;s workflow) should go into
Junio C Hamanoc14e6ad2014-10-31 20:25:53812 the <code>$GIT_DIR/info/exclude</code> file.
Junio C Hamano4f07aec2012-09-25 19:08:44813</p>
814</li>
815<li>
816<p>
Junio C Hamano076ffcc2013-02-06 05:13:21817Patterns which a user wants Git to
Junio C Hamano4f07aec2012-09-25 19:08:44818 ignore in all situations (e.g., backup or temporary files generated by
819 the user&#8217;s editor of choice) generally go into a file specified by
Junio C Hamano322c6242015-03-23 21:32:46820 <code>core.excludesFile</code> in the user&#8217;s <code>~/.gitconfig</code>. Its default value is
Junio C Hamano4f07aec2012-09-25 19:08:44821 $XDG_CONFIG_HOME/git/ignore. If $XDG_CONFIG_HOME is either not set or
822 empty, $HOME/.config/git/ignore is used instead.
823</p>
824</li>
825</ul></div>
Junio C Hamano076ffcc2013-02-06 05:13:21826<div class="paragraph"><p>The underlying Git plumbing tools, such as
Junio C Hamano1aa40d22010-01-21 17:46:43827<em>git ls-files</em> and <em>git read-tree</em>, read
Junio C Hamanoc14e6ad2014-10-31 20:25:53828<code>gitignore</code> patterns specified by command-line options, or from
Junio C Hamano076ffcc2013-02-06 05:13:21829files specified by command-line options. Higher-level Git
Junio C Hamano1aa40d22010-01-21 17:46:43830tools, such as <em>git status</em> and <em>git add</em>,
Junio C Hamanoba4b9282008-07-06 05:20:31831use patterns from the sources specified above.</p></div>
Junio C Hamano2e6ded82010-12-05 06:20:48832</div>
Junio C Hamano9d971152012-12-19 00:43:11833</div>
834<div class="sect1">
Junio C Hamano2e6ded82010-12-05 06:20:48835<h2 id="_pattern_format">PATTERN FORMAT</h2>
836<div class="sectionbody">
837<div class="ulist"><ul>
Junio C Hamano679d22d2007-06-02 21:13:44838<li>
839<p>
840A blank line matches no files, so it can serve as a separator
841 for readability.
842</p>
843</li>
844<li>
845<p>
846A line starting with # serves as a comment.
Junio C Hamanoc14e6ad2014-10-31 20:25:53847 Put a backslash ("<code>\</code>") in front of the first hash for patterns
Junio C Hamano6631a092012-10-10 22:50:57848 that begin with a hash.
Junio C Hamano679d22d2007-06-02 21:13:44849</p>
850</li>
851<li>
852<p>
Junio C Hamanod701ba32014-11-06 23:18:05853Trailing spaces are ignored unless they are quoted with backslash
Junio C Hamanoc14e6ad2014-10-31 20:25:53854 ("<code>\</code>").
Junio C Hamano81703b22014-03-14 22:00:27855</p>
856</li>
857<li>
858<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:53859An optional prefix "<code>!</code>" which negates the pattern; any
Junio C Hamano679d22d2007-06-02 21:13:44860 matching file excluded by a previous pattern will become
Junio C Hamano7abb8752016-03-18 22:52:54861 included again. It is not possible to re-include a file if a parent
862 directory of that file is excluded. Git doesn&#8217;t list excluded
863 directories for performance reasons, so any patterns on contained
864 files have no effect, no matter where they are defined.
Junio C Hamanoc14e6ad2014-10-31 20:25:53865 Put a backslash ("<code>\</code>") in front of the first "<code>!</code>" for patterns
866 that begin with a literal "<code>!</code>", for example, "<code>\!important!.txt</code>".
Junio C Hamano679d22d2007-06-02 21:13:44867</p>
868</li>
869<li>
870<p>
Junio C Hamano6f004d72023-07-27 22:47:55871The slash "<code>/</code>" is used as the directory separator. Separators may
Junio C Hamanod0a99402019-06-21 18:58:41872 occur at the beginning, middle or end of the <code>.gitignore</code> search pattern.
Junio C Hamano26e590a2008-02-17 03:53:51873</p>
874</li>
875<li>
876<p>
Junio C Hamanod0a99402019-06-21 18:58:41877If there is a separator at the beginning or middle (or both) of the
878 pattern, then the pattern is relative to the directory level of the
879 particular <code>.gitignore</code> file itself. Otherwise the pattern may also
880 match at any level below the <code>.gitignore</code> level.
Junio C Hamano679d22d2007-06-02 21:13:44881</p>
882</li>
883<li>
884<p>
Junio C Hamanod0a99402019-06-21 18:58:41885If there is a separator at the end of the pattern then the pattern
886 will only match directories, otherwise the pattern can match both
887 files and directories.
Junio C Hamanoa574a092010-06-13 19:57:10888</p>
889</li>
890<li>
891<p>
Junio C Hamanod0a99402019-06-21 18:58:41892For example, a pattern <code>doc/frotz/</code> matches <code>doc/frotz</code> directory,
893 but not <code>a/doc/frotz</code> directory; however <code>frotz/</code> matches <code>frotz</code>
894 and <code>a/frotz</code> that is a directory (all paths are relative from
895 the <code>.gitignore</code> file).
896</p>
897</li>
898<li>
899<p>
900An asterisk "<code>*</code>" matches anything except a slash.
901 The character "<code>?</code>" matches any one character except "<code>/</code>".
902 The range notation, e.g. <code>[a-zA-Z]</code>, can be used to match
903 one of the characters in a range. See fnmatch(3) and the
904 FNM_PATHNAME flag for a more detailed description.
Junio C Hamano679d22d2007-06-02 21:13:44905</p>
906</li>
Junio C Hamanoba4b9282008-07-06 05:20:31907</ul></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:53908<div class="paragraph"><p>Two consecutive asterisks ("<code>**</code>") in patterns matched against
Junio C Hamanoc087f142013-01-10 23:38:50909full pathname may have special meaning:</p></div>
910<div class="ulist"><ul>
911<li>
912<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:53913A leading "<code>**</code>" followed by a slash means match in all
914 directories. For example, "<code>**/foo</code>" matches file or directory
915 "<code>foo</code>" anywhere, the same as pattern "<code>foo</code>". "<code>**/foo/bar</code>"
916 matches file or directory "<code>bar</code>" anywhere that is directly
917 under directory "<code>foo</code>".
Junio C Hamanoc087f142013-01-10 23:38:50918</p>
919</li>
920<li>
921<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:53922A trailing "<code>/**</code>" matches everything inside. For example,
923 "<code>abc/**</code>" matches all files inside directory "<code>abc</code>", relative
924 to the location of the <code>.gitignore</code> file, with infinite depth.
Junio C Hamanoc087f142013-01-10 23:38:50925</p>
926</li>
927<li>
928<p>
929A slash followed by two consecutive asterisks then a slash
Junio C Hamanoc14e6ad2014-10-31 20:25:53930 matches zero or more directories. For example, "<code>a/**/b</code>"
931 matches "<code>a/b</code>", "<code>a/x/b</code>", "<code>a/x/y/b</code>" and so on.
Junio C Hamanoc087f142013-01-10 23:38:50932</p>
933</li>
934<li>
935<p>
Junio C Hamano06ce83b2018-11-13 14:06:12936Other consecutive asterisks are considered regular asterisks and
937 will match according to the previous rules.
Junio C Hamanoc087f142013-01-10 23:38:50938</p>
939</li>
940</ul></div>
Junio C Hamano2e6ded82010-12-05 06:20:48941</div>
Junio C Hamano9d971152012-12-19 00:43:11942</div>
943<div class="sect1">
Junio C Hamanoe0f71462019-04-09 17:54:45944<h2 id="_configuration">CONFIGURATION</h2>
945<div class="sectionbody">
946<div class="paragraph"><p>The optional configuration variable <code>core.excludesFile</code> indicates a path to a
947file containing patterns of file names to exclude, similar to
948<code>$GIT_DIR/info/exclude</code>. Patterns in the exclude file are used in addition to
949those in <code>$GIT_DIR/info/exclude</code>.</p></div>
950</div>
951</div>
952<div class="sect1">
Junio C Hamano2e6ded82010-12-05 06:20:48953<h2 id="_notes">NOTES</h2>
954<div class="sectionbody">
955<div class="paragraph"><p>The purpose of gitignore files is to ensure that certain files
Junio C Hamano076ffcc2013-02-06 05:13:21956not tracked by Git remain untracked.</p></div>
Junio C Hamano2e6ded82010-12-05 06:20:48957<div class="paragraph"><p>To stop tracking a file that is currently tracked, use
Junio C Hamano7ab2d202023-05-10 18:59:24958<em>git rm --cached</em> to remove the file from the index. The filename
959can then be added to the <code>.gitignore</code> file to stop the file from
960being reintroduced in later commits.</p></div>
Junio C Hamano51a55bc2021-05-12 05:22:19961<div class="paragraph"><p>Git does not follow symbolic links when accessing a <code>.gitignore</code> file in
962the working tree. This keeps behavior consistent when the file is
963accessed from the index or a tree versus from the filesystem.</p></div>
Junio C Hamano2e6ded82010-12-05 06:20:48964</div>
Junio C Hamano9d971152012-12-19 00:43:11965</div>
966<div class="sect1">
Junio C Hamano2e6ded82010-12-05 06:20:48967<h2 id="_examples">EXAMPLES</h2>
968<div class="sectionbody">
Junio C Hamanod0a99402019-06-21 18:58:41969<div class="ulist"><ul>
970<li>
971<p>
Junio C Hamano19dcd3f2021-10-29 23:20:47972The pattern <code>hello.*</code> matches any file or directory
Junio C Hamano458281a2021-03-22 21:20:26973 whose name begins with <code>hello.</code>. If one wants to restrict
Junio C Hamanod0a99402019-06-21 18:58:41974 this only to the directory and not in its subdirectories,
975 one can prepend the pattern with a slash, i.e. <code>/hello.*</code>;
976 the pattern now matches <code>hello.txt</code>, <code>hello.c</code> but not
977 <code>a/hello.java</code>.
978</p>
979</li>
980<li>
981<p>
982The pattern <code>foo/</code> will match a directory <code>foo</code> and
983 paths underneath it, but will not match a regular file
984 or a symbolic link <code>foo</code> (this is consistent with the
985 way how pathspec works in general in Git)
986</p>
987</li>
988<li>
989<p>
990The pattern <code>doc/frotz</code> and <code>/doc/frotz</code> have the same effect
991 in any <code>.gitignore</code> file. In other words, a leading slash
992 is not relevant if there is already a middle slash in
993 the pattern.
994</p>
995</li>
996<li>
997<p>
Junio C Hamano12ad45d2023-07-26 21:29:48998The pattern <code>foo/*</code>, matches <code>foo/test.json</code>
999 (a regular file), <code>foo/bar</code> (a directory), but it does not match
1000 <code>foo/bar/hello.c</code> (a regular file), as the asterisk in the
1001 pattern does not match <code>bar/hello.c</code> which has a slash in it.
Junio C Hamanod0a99402019-06-21 18:58:411002</p>
1003</li>
1004</ul></div>
Junio C Hamano679d22d2007-06-02 21:13:441005<div class="listingblock">
1006<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531007<pre><code> $ git status
Junio C Hamano679d22d2007-06-02 21:13:441008 [...]
1009 # Untracked files:
1010 [...]
1011 # Documentation/foo.html
1012 # Documentation/gitignore.html
1013 # file.o
1014 # lib.a
1015 # src/internal.o
1016 [...]
1017 $ cat .git/info/exclude
1018 # ignore objects and archives, anywhere in the tree.
1019 *.[oa]
1020 $ cat Documentation/.gitignore
1021 # ignore generated html files,
1022 *.html
1023 # except foo.html which is maintained by hand
1024 !foo.html
Junio C Hamanofce7c7e2008-07-02 03:06:381025 $ git status
Junio C Hamano679d22d2007-06-02 21:13:441026 [...]
1027 # Untracked files:
1028 [...]
1029 # Documentation/foo.html
Junio C Hamanoc14e6ad2014-10-31 20:25:531030 [...]</code></pre>
Junio C Hamano679d22d2007-06-02 21:13:441031</div></div>
Junio C Hamano2e6ded82010-12-05 06:20:481032<div class="paragraph"><p>Another example:</p></div>
Junio C Hamano679d22d2007-06-02 21:13:441033<div class="listingblock">
1034<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531035<pre><code> $ cat .gitignore
Junio C Hamano679d22d2007-06-02 21:13:441036 vmlinux*
1037 $ ls arch/foo/kernel/vm*
1038 arch/foo/kernel/vmlinux.lds.S
Junio C Hamanoc14e6ad2014-10-31 20:25:531039 $ echo '!/vmlinux*' &gt;arch/foo/kernel/.gitignore</code></pre>
Junio C Hamano679d22d2007-06-02 21:13:441040</div></div>
Junio C Hamano076ffcc2013-02-06 05:13:211041<div class="paragraph"><p>The second .gitignore prevents Git from ignoring
Junio C Hamanoc14e6ad2014-10-31 20:25:531042<code>arch/foo/kernel/vmlinux.lds.S</code>.</p></div>
1043<div class="paragraph"><p>Example to exclude everything except a specific directory <code>foo/bar</code>
1044(note the <code>/*</code> - without the slash, the wildcard would also exclude
1045everything within <code>foo/bar</code>):</p></div>
Junio C Hamanocf77b042013-12-17 23:54:211046<div class="listingblock">
1047<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531048<pre><code> $ cat .gitignore
Junio C Hamanocf77b042013-12-17 23:54:211049 # exclude everything except directory foo/bar
1050 /*
1051 !/foo
1052 /foo/*
Junio C Hamanoc14e6ad2014-10-31 20:25:531053 !/foo/bar</code></pre>
Junio C Hamanocf77b042013-12-17 23:54:211054</div></div>
Junio C Hamano679d22d2007-06-02 21:13:441055</div>
Junio C Hamano9d971152012-12-19 00:43:111056</div>
1057<div class="sect1">
Junio C Hamano2e6ded82010-12-05 06:20:481058<h2 id="_see_also">SEE ALSO</h2>
1059<div class="sectionbody">
Junio C Hamano36d52292013-01-25 21:32:361060<div class="paragraph"><p><a href="git-rm.html">git-rm(1)</a>,
Junio C Hamano36d52292013-01-25 21:32:361061<a href="gitrepository-layout.html">gitrepository-layout(5)</a>,
1062<a href="git-check-ignore.html">git-check-ignore(1)</a></p></div>
Junio C Hamano2e6ded82010-12-05 06:20:481063</div>
Junio C Hamano9d971152012-12-19 00:43:111064</div>
1065<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311066<h2 id="_git">GIT</h2>
Junio C Hamano679d22d2007-06-02 21:13:441067<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231068<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano679d22d2007-06-02 21:13:441069</div>
Junio C Hamano7bd050f2011-09-22 06:32:221070</div>
Junio C Hamano9d971152012-12-19 00:43:111071</div>
Junio C Hamano7bd050f2011-09-22 06:32:221072<div id="footnotes"><hr /></div>
Junio C Hamano679d22d2007-06-02 21:13:441073<div id="footer">
1074<div id="footer-text">
Junio C Hamano2ef0ba32018-01-26 23:13:531075Last updated
Junio C Hamano6f004d72023-07-27 22:47:551076 2023-07-27 15:46:24 PDT
Junio C Hamano679d22d2007-06-02 21:13:441077</div>
1078</div>
1079</body>
1080</html>