Autogenerated HTML docs for v1.3.1-g7464
[git.git] / repository-layout.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
2     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
4 <head>\r
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
6 <meta name="generator" content="AsciiDoc 7.0.2" />\r
7 <style type="text/css">\r
8 /* Debug borders */\r
9 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
10 /*\r
11   border: 1px solid red;\r
12 */\r
13 }\r
14 \r
15 body {\r
16   margin: 1em 5% 1em 5%;\r
17 }\r
18 \r
19 a { color: blue; }\r
20 a:visited { color: fuchsia; }\r
21 \r
22 em {\r
23   font-style: italic;\r
24 }\r
25 \r
26 strong {\r
27   font-weight: bold;\r
28 }\r
29 \r
30 tt {\r
31   color: navy;\r
32 }\r
33 \r
34 h1, h2, h3, h4, h5, h6 {\r
35   color: #527bbd;\r
36   font-family: sans-serif;\r
37   margin-top: 1.2em;\r
38   margin-bottom: 0.5em;\r
39   line-height: 1.3;\r
40 }\r
41 \r
42 h1 {\r
43   border-bottom: 2px solid silver;\r
44 }\r
45 h2 {\r
46   border-bottom: 2px solid silver;\r
47   padding-top: 0.5em;\r
48 }\r
49 \r
50 div.sectionbody {\r
51   font-family: serif;\r
52   margin-left: 0;\r
53 }\r
54 \r
55 hr {\r
56   border: 1px solid silver;\r
57 }\r
58 \r
59 p {\r
60   margin-top: 0.5em;\r
61   margin-bottom: 0.5em;\r
62 }\r
63 \r
64 pre {\r
65   padding: 0;\r
66   margin: 0;\r
67 }\r
68 \r
69 span#author {\r
70   color: #527bbd;\r
71   font-family: sans-serif;\r
72   font-weight: bold;\r
73   font-size: 1.2em;\r
74 }\r
75 span#email {\r
76 }\r
77 span#revision {\r
78   font-family: sans-serif;\r
79 }\r
80 \r
81 div#footer {\r
82   font-family: sans-serif;\r
83   font-size: small;\r
84   border-top: 2px solid silver;\r
85   padding-top: 0.5em;\r
86   margin-top: 4.0em;\r
87 }\r
88 div#footer-text {\r
89   float: left;\r
90   padding-bottom: 0.5em;\r
91 }\r
92 div#footer-badges {\r
93   float: right;\r
94   padding-bottom: 0.5em;\r
95 }\r
96 \r
97 div#preamble,\r
98 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,\r
99 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r
100 div.admonitionblock {\r
101   margin-right: 10%;\r
102   margin-top: 1.5em;\r
103   margin-bottom: 1.5em;\r
104 }\r
105 div.admonitionblock {\r
106   margin-top: 2.5em;\r
107   margin-bottom: 2.5em;\r
108 }\r
109 \r
110 div.content { /* Block element content. */\r
111   padding: 0;\r
112 }\r
113 \r
114 /* Block element titles. */\r
115 div.title, caption.title {\r
116   font-family: sans-serif;\r
117   font-weight: bold;\r
118   text-align: left;\r
119   margin-top: 1.0em;\r
120   margin-bottom: 0.5em;\r
121 }\r
122 div.title + * {\r
123   margin-top: 0;\r
124 }\r
125 \r
126 td div.title:first-child {\r
127   margin-top: 0.0em;\r
128 }\r
129 div.content div.title:first-child {\r
130   margin-top: 0.0em;\r
131 }\r
132 div.content + div.title {\r
133   margin-top: 0.0em;\r
134 }\r
135 \r
136 div.sidebarblock > div.content {\r
137   background: #ffffee;\r
138   border: 1px solid silver;\r
139   padding: 0.5em;\r
140 }\r
141 \r
142 div.listingblock > div.content {\r
143   border: 1px solid silver;\r
144   background: #f4f4f4;\r
145   padding: 0.5em;\r
146 }\r
147 \r
148 div.quoteblock > div.content {\r
149   padding-left: 2.0em;\r
150 }\r
151 div.quoteblock .attribution {\r
152   text-align: right;\r
153 }\r
154 \r
155 div.admonitionblock .icon {\r
156   vertical-align: top;\r
157   font-size: 1.1em;\r
158   font-weight: bold;\r
159   text-decoration: underline;\r
160   color: #527bbd;\r
161   padding-right: 0.5em;\r
162 }\r
163 div.admonitionblock td.content {\r
164   padding-left: 0.5em;\r
165   border-left: 2px solid silver;\r
166 }\r
167 \r
168 div.exampleblock > div.content {\r
169   border-left: 2px solid silver;\r
170   padding: 0.5em;\r
171 }\r
172 \r
173 div.verseblock div.content {\r
174   white-space: pre;\r
175 }\r
176 \r
177 div.imageblock div.content { padding-left: 0; }\r
178 div.imageblock img { border: 1px solid silver; }\r
179 span.image img { border-style: none; }\r
180 \r
181 dl {\r
182   margin-top: 0.8em;\r
183   margin-bottom: 0.8em;\r
184 }\r
185 dt {\r
186   margin-top: 0.5em;\r
187   margin-bottom: 0;\r
188   font-style: italic;\r
189 }\r
190 dd > *:first-child {\r
191   margin-top: 0;\r
192 }\r
193 \r
194 ul, ol {\r
195     list-style-position: outside;\r
196 }\r
197 ol.olist2 {\r
198   list-style-type: lower-alpha;\r
199 }\r
200 \r
201 div.tableblock > table {\r
202   border-color: #527bbd;\r
203   border-width: 3px;\r
204 }\r
205 thead {\r
206   font-family: sans-serif;\r
207   font-weight: bold;\r
208 }\r
209 tfoot {\r
210   font-weight: bold;\r
211 }\r
212 \r
213 div.hlist {\r
214   margin-top: 0.8em;\r
215   margin-bottom: 0.8em;\r
216 }\r
217 td.hlist1 {\r
218   vertical-align: top;\r
219   font-style: italic;\r
220   padding-right: 0.8em;\r
221 }\r
222 td.hlist2 {\r
223   vertical-align: top;\r
224 }\r
225 \r
226 @media print {\r
227   div#footer-badges { display: none; }\r
228 }\r
229 /* Workarounds for IE6's broken and incomplete CSS2. */\r
230 \r
231 div.sidebar-content {\r
232   background: #ffffee;\r
233   border: 1px solid silver;\r
234   padding: 0.5em;\r
235 }\r
236 div.sidebar-title, div.image-title {\r
237   font-family: sans-serif;\r
238   font-weight: bold;\r
239   margin-top: 0.0em;\r
240   margin-bottom: 0.5em;\r
241 }\r
242 \r
243 div.listingblock div.content {\r
244   border: 1px solid silver;\r
245   background: #f4f4f4;\r
246   padding: 0.5em;\r
247 }\r
248 \r
249 div.quoteblock-content {\r
250   padding-left: 2.0em;\r
251 }\r
252 \r
253 div.exampleblock-content {\r
254   border-left: 2px solid silver;\r
255   padding-left: 0.5em;\r
256 }\r
257 </style>\r
258 <title>git repository layout</title>\r
259 </head>\r
260 <body>\r
261 <div id="header">\r
262 <h1>git repository layout</h1>\r
263 </div>\r
264 <div id="preamble">\r
265 <div class="sectionbody">\r
266 <p>You may find these things in your git repository (<tt>.git</tt>\r
267 directory for a repository associated with your working tree, or\r
268 <tt><em>project</em>.git</tt> directory for a public <em>bare</em> repository).</p>\r
269 <dl>\r
270 <dt>\r
271 objects\r
272 </dt>\r
273 <dd>\r
274 <p>\r
275         Object store associated with this repository.  Usually\r
276         an object store is self sufficient (i.e. all the objects\r
277         that are referred to by an object found in it are also\r
278         found in it), but there are couple of ways to violate\r
279         it.\r
280 </p>\r
281 <ol>\r
282 <li>\r
283 <p>\r
284 You could populate the repository by running a commit walker\r
285 without <tt>-a</tt> option.  Depending on which options are given, you\r
286 could have only commit objects without associated blobs and\r
287 trees this way, for example.  A repository with this kind of\r
288 incomplete object store is not suitable to be published to the\r
289 outside world but sometimes useful for private repository.\r
290 </p>\r
291 </li>\r
292 <li>\r
293 <p>\r
294 You can be using <tt>objects/info/alternates</tt> mechanism, or\r
295 <tt>$GIT_ALTERNATE_OBJECT_DIRECTORIES</tt> mechanism to <em>borrow</em>\r
296 objects from other object stores.  A repository with this kind\r
297 of incomplete object store is not suitable to be published for\r
298 use with dumb transports but otherwise is OK as long as\r
299 <tt>objects/info/alternates</tt> points at the right object stores\r
300 it borrows from.\r
301 </p>\r
302 </li>\r
303 </ol>\r
304 </dd>\r
305 <dt>\r
306 objects/[0-9a-f][0-9a-f]\r
307 </dt>\r
308 <dd>\r
309 <p>\r
310         Traditionally, each object is stored in its own file.\r
311         They are split into 256 subdirectories using the first\r
312         two letters from its object name to keep the number of\r
313         directory entries <tt>objects</tt> directory itself needs to\r
314         hold.  Objects found here are often called <em>unpacked</em>\r
315         objects.\r
316 </p>\r
317 </dd>\r
318 <dt>\r
319 objects/pack\r
320 </dt>\r
321 <dd>\r
322 <p>\r
323         Packs (files that store many object in compressed form,\r
324         along with index files to allow them to be randomly\r
325         accessed) are found in this directory.\r
326 </p>\r
327 </dd>\r
328 <dt>\r
329 objects/info\r
330 </dt>\r
331 <dd>\r
332 <p>\r
333         Additional information about the object store is\r
334         recorded in this directory.\r
335 </p>\r
336 </dd>\r
337 <dt>\r
338 objects/info/packs\r
339 </dt>\r
340 <dd>\r
341 <p>\r
342         This file is to help dumb transports discover what packs\r
343         are available in this object store.  Whenever a pack is\r
344         added or removed, <tt>git update-server-info</tt> should be run\r
345         to keep this file up-to-date if the repository is\r
346         published for dumb transports.  <tt>git repack</tt> does this\r
347         by default.\r
348 </p>\r
349 </dd>\r
350 <dt>\r
351 objects/info/alternates\r
352 </dt>\r
353 <dd>\r
354 <p>\r
355         This file records absolute filesystem paths of alternate\r
356         object stores that this object store borrows objects\r
357         from, one pathname per line.\r
358 </p>\r
359 </dd>\r
360 <dt>\r
361 refs\r
362 </dt>\r
363 <dd>\r
364 <p>\r
365         References are stored in subdirectories of this\r
366         directory.  The <tt>git prune</tt> command knows to keep\r
367         objects reachable from refs found in this directory and\r
368         its subdirectories.\r
369 </p>\r
370 </dd>\r
371 <dt>\r
372 refs/heads/<tt>name</tt>\r
373 </dt>\r
374 <dd>\r
375 <p>\r
376         records tip-of-the-tree commit objects of branch <tt>name</tt>\r
377 </p>\r
378 </dd>\r
379 <dt>\r
380 refs/tags/<tt>name</tt>\r
381 </dt>\r
382 <dd>\r
383 <p>\r
384         records any object name (not necessarily a commit\r
385         object, or a tag object that points at a commit object).\r
386 </p>\r
387 </dd>\r
388 <dt>\r
389 HEAD\r
390 </dt>\r
391 <dd>\r
392 <p>\r
393         A symlink of the form <tt>refs/heads/<em>name</em></tt> to point at\r
394         the current branch, if exists.  It does not mean much if\r
395         the repository is not associated with any working tree\r
396         (i.e. a <em>bare</em> repository), but a valid git repository\r
397         <strong>must</strong> have such a symlink here.  It is legal if the\r
398         named branch <em>name</em> does not (yet) exist.\r
399 </p>\r
400 </dd>\r
401 <dt>\r
402 branches\r
403 </dt>\r
404 <dd>\r
405 <p>\r
406         A slightly deprecated way to store shorthands to be used\r
407         to specify URL to <tt>git fetch</tt>, <tt>git pull</tt> and <tt>git push</tt>\r
408         commands is to store a file in <tt>branches/<em>name</em></tt> and\r
409         give <em>name</em> to these commands in place of <em>repository</em>\r
410         argument.\r
411 </p>\r
412 </dd>\r
413 <dt>\r
414 hooks\r
415 </dt>\r
416 <dd>\r
417 <p>\r
418         Hooks are customization scripts used by various git\r
419         commands.  A handful of sample hooks are installed when\r
420         <tt>git init-db</tt> is run, but all of them are disabled by\r
421         default.  To enable, they need to be made executable.\r
422         Read <a href="hooks.html">hooks</a> for more details about\r
423         each hook.\r
424 </p>\r
425 </dd>\r
426 <dt>\r
427 index\r
428 </dt>\r
429 <dd>\r
430 <p>\r
431         The current index file for the repository.  It is\r
432         usually not found in a bare repository.\r
433 </p>\r
434 </dd>\r
435 <dt>\r
436 info\r
437 </dt>\r
438 <dd>\r
439 <p>\r
440         Additional information about the repository is recorded\r
441         in this directory.\r
442 </p>\r
443 </dd>\r
444 <dt>\r
445 info/refs\r
446 </dt>\r
447 <dd>\r
448 <p>\r
449         This file is to help dumb transports to discover what\r
450         refs are available in this repository.  Whenever you\r
451         create/delete a new branch or a new tag, <tt>git\r
452         update-server-info</tt> should be run to keep this file\r
453         up-to-date if the repository is published for dumb\r
454         transports.  The <tt>git-receive-pack</tt> command, which is\r
455         run on a remote repository when you <tt>git push</tt> into it,\r
456         runs <tt>hooks/update</tt> hook to help you achieve this.\r
457 </p>\r
458 </dd>\r
459 <dt>\r
460 info/grafts\r
461 </dt>\r
462 <dd>\r
463 <p>\r
464         This file records fake commit ancestry information, to\r
465         pretend the set of parents a commit has is different\r
466         from how the commit was actually created.  One record\r
467         per line describes a commit and its fake parents by\r
468         listing their 40-byte hexadecimal object names separated\r
469         by a space and terminated by a newline.\r
470 </p>\r
471 </dd>\r
472 <dt>\r
473 info/exclude\r
474 </dt>\r
475 <dd>\r
476 <p>\r
477         This file, by convention among Porcelains, stores the\r
478         exclude pattern list.  <tt>git status</tt> looks at it, but\r
479         otherwise it is not looked at by any of the core git\r
480         commands.\r
481 </p>\r
482 </dd>\r
483 <dt>\r
484 remotes\r
485 </dt>\r
486 <dd>\r
487 <p>\r
488         Stores shorthands to be used to give URL and default\r
489         refnames to interact with remote repository to <tt>git\r
490         fetch</tt>, <tt>git pull</tt> and <tt>git push</tt> commands.\r
491 </p>\r
492 </dd>\r
493 </dl>\r
494 </div>\r
495 </div>\r
496 <div id="footer">\r
497 <div id="footer-text">\r
498 Last updated 26-Mar-2006 01:49:02 UTC\r
499 </div>\r
500 </div>\r
501 </body>\r
502 </html>\r