blob: 0c21097faf02558a92f59530319082879893754c [file] [log] [blame]
Junio C Hamanof7c042d2008-06-06 22:50:531<!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>
5<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Junio C Hamanoba4b9282008-07-06 05:20:316<meta name="generator" content="AsciiDoc 8.2.5" />
Junio C Hamanof7c042d2008-06-06 22:50:537<style type="text/css">
8/* Debug borders */
9p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
10/*
11 border: 1px solid red;
12*/
13}
14
15body {
16 margin: 1em 5% 1em 5%;
17}
18
Junio C Hamanoba4b9282008-07-06 05:20:3119a {
20 color: blue;
21 text-decoration: underline;
22}
23a:visited {
24 color: fuchsia;
25}
Junio C Hamanof7c042d2008-06-06 22:50:5326
27em {
28 font-style: italic;
29}
30
31strong {
32 font-weight: bold;
33}
34
35tt {
36 color: navy;
37}
38
39h1, h2, h3, h4, h5, h6 {
40 color: #527bbd;
41 font-family: sans-serif;
42 margin-top: 1.2em;
43 margin-bottom: 0.5em;
44 line-height: 1.3;
45}
46
Junio C Hamanoba4b9282008-07-06 05:20:3147h1, h2, h3 {
Junio C Hamanof7c042d2008-06-06 22:50:5348 border-bottom: 2px solid silver;
49}
50h2 {
Junio C Hamanof7c042d2008-06-06 22:50:5351 padding-top: 0.5em;
52}
Junio C Hamanoba4b9282008-07-06 05:20:3153h3 {
54 float: left;
55}
56h3 + * {
57 clear: left;
58}
Junio C Hamanof7c042d2008-06-06 22:50:5359
60div.sectionbody {
61 font-family: serif;
62 margin-left: 0;
63}
64
65hr {
66 border: 1px solid silver;
67}
68
69p {
70 margin-top: 0.5em;
71 margin-bottom: 0.5em;
72}
73
74pre {
75 padding: 0;
76 margin: 0;
77}
78
79span#author {
80 color: #527bbd;
81 font-family: sans-serif;
82 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:3183 font-size: 1.1em;
Junio C Hamanof7c042d2008-06-06 22:50:5384}
85span#email {
86}
87span#revision {
88 font-family: sans-serif;
89}
90
91div#footer {
92 font-family: sans-serif;
93 font-size: small;
94 border-top: 2px solid silver;
95 padding-top: 0.5em;
96 margin-top: 4.0em;
97}
98div#footer-text {
99 float: left;
100 padding-bottom: 0.5em;
101}
102div#footer-badges {
103 float: right;
104 padding-bottom: 0.5em;
105}
106
107div#preamble,
108div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
109div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
110div.admonitionblock {
111 margin-right: 10%;
112 margin-top: 1.5em;
113 margin-bottom: 1.5em;
114}
115div.admonitionblock {
116 margin-top: 2.5em;
117 margin-bottom: 2.5em;
118}
119
120div.content { /* Block element content. */
121 padding: 0;
122}
123
124/* Block element titles. */
125div.title, caption.title {
126 font-family: sans-serif;
127 font-weight: bold;
128 text-align: left;
129 margin-top: 1.0em;
130 margin-bottom: 0.5em;
131}
132div.title + * {
133 margin-top: 0;
134}
135
136td div.title:first-child {
137 margin-top: 0.0em;
138}
139div.content div.title:first-child {
140 margin-top: 0.0em;
141}
142div.content + div.title {
143 margin-top: 0.0em;
144}
145
146div.sidebarblock > div.content {
147 background: #ffffee;
148 border: 1px solid silver;
149 padding: 0.5em;
150}
151
Junio C Hamanoba4b9282008-07-06 05:20:31152div.listingblock {
153 margin-right: 0%;
154}
Junio C Hamanof7c042d2008-06-06 22:50:53155div.listingblock > div.content {
156 border: 1px solid silver;
157 background: #f4f4f4;
158 padding: 0.5em;
159}
160
161div.quoteblock > div.content {
162 padding-left: 2.0em;
163}
Junio C Hamanoba4b9282008-07-06 05:20:31164
165div.attribution {
Junio C Hamanof7c042d2008-06-06 22:50:53166 text-align: right;
167}
Junio C Hamanoba4b9282008-07-06 05:20:31168div.verseblock + div.attribution {
169 text-align: left;
170}
Junio C Hamanof7c042d2008-06-06 22:50:53171
172div.admonitionblock .icon {
173 vertical-align: top;
174 font-size: 1.1em;
175 font-weight: bold;
176 text-decoration: underline;
177 color: #527bbd;
178 padding-right: 0.5em;
179}
180div.admonitionblock td.content {
181 padding-left: 0.5em;
182 border-left: 2px solid silver;
183}
184
185div.exampleblock > div.content {
186 border-left: 2px solid silver;
187 padding: 0.5em;
188}
189
190div.verseblock div.content {
191 white-space: pre;
192}
193
194div.imageblock div.content { padding-left: 0; }
195div.imageblock img { border: 1px solid silver; }
196span.image img { border-style: none; }
197
198dl {
199 margin-top: 0.8em;
200 margin-bottom: 0.8em;
201}
202dt {
203 margin-top: 0.5em;
204 margin-bottom: 0;
205 font-style: italic;
206}
207dd > *:first-child {
208 margin-top: 0;
209}
210
211ul, ol {
212 list-style-position: outside;
213}
Junio C Hamanoba4b9282008-07-06 05:20:31214div.olist2 ol {
Junio C Hamanof7c042d2008-06-06 22:50:53215 list-style-type: lower-alpha;
216}
217
218div.tableblock > table {
Junio C Hamanoba4b9282008-07-06 05:20:31219 border: 3px solid #527bbd;
Junio C Hamanof7c042d2008-06-06 22:50:53220}
221thead {
222 font-family: sans-serif;
223 font-weight: bold;
224}
225tfoot {
226 font-weight: bold;
227}
228
229div.hlist {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
Junio C Hamanoba4b9282008-07-06 05:20:31233div.hlist td {
234 padding-bottom: 5px;
235}
Junio C Hamanof7c042d2008-06-06 22:50:53236td.hlist1 {
237 vertical-align: top;
238 font-style: italic;
239 padding-right: 0.8em;
240}
241td.hlist2 {
242 vertical-align: top;
243}
244
245@media print {
246 div#footer-badges { display: none; }
247}
Junio C Hamanoba4b9282008-07-06 05:20:31248
249div#toctitle {
250 color: #527bbd;
251 font-family: sans-serif;
252 font-size: 1.1em;
253 font-weight: bold;
254 margin-top: 1.0em;
255 margin-bottom: 0.1em;
256}
257
258div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
259 margin-top: 0;
260 margin-bottom: 0;
261}
262div.toclevel2 {
263 margin-left: 2em;
264 font-size: 0.9em;
265}
266div.toclevel3 {
267 margin-left: 4em;
268 font-size: 0.9em;
269}
270div.toclevel4 {
271 margin-left: 6em;
272 font-size: 0.9em;
273}
274include1::./stylesheets/xhtml11-manpage.css[]
Junio C Hamanof7c042d2008-06-06 22:50:53275/* Workarounds for IE6's broken and incomplete CSS2. */
276
277div.sidebar-content {
278 background: #ffffee;
279 border: 1px solid silver;
280 padding: 0.5em;
281}
282div.sidebar-title, div.image-title {
283 font-family: sans-serif;
284 font-weight: bold;
285 margin-top: 0.0em;
286 margin-bottom: 0.5em;
287}
288
289div.listingblock div.content {
290 border: 1px solid silver;
291 background: #f4f4f4;
292 padding: 0.5em;
293}
294
295div.quoteblock-content {
296 padding-left: 2.0em;
297}
298
299div.exampleblock-content {
300 border-left: 2px solid silver;
301 padding-left: 0.5em;
302}
Junio C Hamanoba4b9282008-07-06 05:20:31303
304/* IE6 sets dynamically generated links as visited. */
305div#toc a:visited { color: blue; }
Junio C Hamanof7c042d2008-06-06 22:50:53306</style>
307<title>gitrepository-layout(5)</title>
308</head>
309<body>
310<div id="header">
311<h1>
312gitrepository-layout(5) Manual Page
313</h1>
314<h2>NAME</h2>
315<div class="sectionbody">
316<p>gitrepository-layout -
317 Git Repository Layout
318</p>
319</div>
320</div>
321<h2>SYNOPSIS</h2>
322<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31323<div class="para"><p>$GIT_DIR/*</p></div>
Junio C Hamanof7c042d2008-06-06 22:50:53324</div>
Junio C Hamanoba4b9282008-07-06 05:20:31325<h2 id="_description">DESCRIPTION</h2>
Junio C Hamanof7c042d2008-06-06 22:50:53326<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31327<div class="para"><p>You may find these things in your git repository (<tt>.git</tt>
Junio C Hamanof7c042d2008-06-06 22:50:53328directory for a repository associated with your working tree, or
329<tt>&lt;project&gt;.git</tt> directory for a public <em>bare</em> repository. It is
330also possible to have a working tree where <tt>.git</tt> is a plain
331ascii file containing <tt>gitdir: &lt;path&gt;</tt>, i.e. the path to the
Junio C Hamanoba4b9282008-07-06 05:20:31332real git repository).</p></div>
333<div class="vlist"><dl>
Junio C Hamanof7c042d2008-06-06 22:50:53334<dt>
335objects
336</dt>
337<dd>
338<p>
339 Object store associated with this repository. Usually
340 an object store is self sufficient (i.e. all the objects
341 that are referred to by an object found in it are also
342 found in it), but there are couple of ways to violate
343 it.
344</p>
Junio C Hamanoba4b9282008-07-06 05:20:31345<div class="olist"><ol>
Junio C Hamanof7c042d2008-06-06 22:50:53346<li>
347<p>
348You could populate the repository by running a commit walker
349without <tt>-a</tt> option. Depending on which options are given, you
350could have only commit objects without associated blobs and
351trees this way, for example. A repository with this kind of
352incomplete object store is not suitable to be published to the
353outside world but sometimes useful for private repository.
354</p>
355</li>
356<li>
357<p>
358You also could have an incomplete but locally usable repository
359by cloning shallowly. See <a href="git-clone.html">git-clone(1)</a>.
360</p>
361</li>
362<li>
363<p>
364You can be using <tt>objects/info/alternates</tt> mechanism, or
365<tt>$GIT_ALTERNATE_OBJECT_DIRECTORIES</tt> mechanism to <em>borrow</em>
366objects from other object stores. A repository with this kind
367of incomplete object store is not suitable to be published for
368use with dumb transports but otherwise is OK as long as
369<tt>objects/info/alternates</tt> points at the right object stores
370it borrows from.
371</p>
372</li>
Junio C Hamanoba4b9282008-07-06 05:20:31373</ol></div>
Junio C Hamanof7c042d2008-06-06 22:50:53374</dd>
375<dt>
376objects/[0-9a-f][0-9a-f]
377</dt>
378<dd>
379<p>
380 Traditionally, each object is stored in its own file.
381 They are split into 256 subdirectories using the first
382 two letters from its object name to keep the number of
383 directory entries <tt>objects</tt> directory itself needs to
384 hold. Objects found here are often called <em>unpacked</em>
385 (or <em>loose</em>) objects.
386</p>
387</dd>
388<dt>
389objects/pack
390</dt>
391<dd>
392<p>
393 Packs (files that store many object in compressed form,
394 along with index files to allow them to be randomly
395 accessed) are found in this directory.
396</p>
397</dd>
398<dt>
399objects/info
400</dt>
401<dd>
402<p>
403 Additional information about the object store is
404 recorded in this directory.
405</p>
406</dd>
407<dt>
408objects/info/packs
409</dt>
410<dd>
411<p>
412 This file is to help dumb transports discover what packs
413 are available in this object store. Whenever a pack is
414 added or removed, <tt>git update-server-info</tt> should be run
415 to keep this file up-to-date if the repository is
Junio C Hamanoba4b9282008-07-06 05:20:31416 published for dumb transports. <em>git-repack</em> does this
Junio C Hamanof7c042d2008-06-06 22:50:53417 by default.
418</p>
419</dd>
420<dt>
421objects/info/alternates
422</dt>
423<dd>
424<p>
425 This file records paths to alternate object stores that
426 this object store borrows objects from, one pathname per
427 line. Note that not only native Git tools use it locally,
428 but the HTTP fetcher also tries to use it remotely; this
429 will usually work if you have relative paths (relative
430 to the object database, not to the repository!) in your
431 alternates file, but it will not work if you use absolute
432 paths unless the absolute path in filesystem and web URL
433 is the same. See also <em>objects/info/http-alternates</em>.
434</p>
435</dd>
436<dt>
437objects/info/http-alternates
438</dt>
439<dd>
440<p>
441 This file records URLs to alternate object stores that
442 this object store borrows objects from, to be used when
443 the repository is fetched over HTTP.
444</p>
445</dd>
446<dt>
447refs
448</dt>
449<dd>
450<p>
451 References are stored in subdirectories of this
Junio C Hamanoba4b9282008-07-06 05:20:31452 directory. The <em>git-prune</em> command knows to keep
Junio C Hamanof7c042d2008-06-06 22:50:53453 objects reachable from refs found in this directory and
454 its subdirectories.
455</p>
456</dd>
457<dt>
458refs/heads/<tt>name</tt>
459</dt>
460<dd>
461<p>
462 records tip-of-the-tree commit objects of branch <tt>name</tt>
463</p>
464</dd>
465<dt>
466refs/tags/<tt>name</tt>
467</dt>
468<dd>
469<p>
470 records any object name (not necessarily a commit
471 object, or a tag object that points at a commit object).
472</p>
473</dd>
474<dt>
475refs/remotes/<tt>name</tt>
476</dt>
477<dd>
478<p>
479 records tip-of-the-tree commit objects of branches copied
480 from a remote repository.
481</p>
482</dd>
483<dt>
484packed-refs
485</dt>
486<dd>
487<p>
488 records the same information as refs/heads/, refs/tags/,
489 and friends record in a more efficient way. See
490 <a href="git-pack-refs.html">git-pack-refs(1)</a>.
491</p>
492</dd>
493<dt>
494HEAD
495</dt>
496<dd>
497<p>
498 A symref (see glossary) to the <tt>refs/heads/</tt> namespace
499 describing the currently active branch. It does not mean
500 much if the repository is not associated with any working tree
501 (i.e. a <em>bare</em> repository), but a valid git repository
502 <strong>must</strong> have the HEAD file; some porcelains may use it to
503 guess the designated "default" branch of the repository
504 (usually <em>master</em>). It is legal if the named branch
505 <em>name</em> does not (yet) exist. In some legacy setups, it is
506 a symbolic link instead of a symref that points at the current
507 branch.
508</p>
Junio C Hamanoba4b9282008-07-06 05:20:31509<div class="para"><p>HEAD can also record a specific commit directly, instead of
Junio C Hamanof7c042d2008-06-06 22:50:53510being a symref to point at the current branch. Such a state
511is often called <em>detached HEAD</em>, and almost all commands work
512identically as normal. See <a href="git-checkout.html">git-checkout(1)</a> for
Junio C Hamanoba4b9282008-07-06 05:20:31513details.</p></div>
Junio C Hamanof7c042d2008-06-06 22:50:53514</dd>
515<dt>
516branches
517</dt>
518<dd>
519<p>
520 A slightly deprecated way to store shorthands to be used
Junio C Hamanoba4b9282008-07-06 05:20:31521 to specify URL to <em>git-fetch</em>, <em>git-pull</em> and <em>git-push</em>
Junio C Hamanof7c042d2008-06-06 22:50:53522 commands is to store a file in <tt>branches/&lt;name&gt;</tt> and
523 give <em>name</em> to these commands in place of <em>repository</em>
524 argument.
525</p>
526</dd>
527<dt>
528hooks
529</dt>
530<dd>
531<p>
532 Hooks are customization scripts used by various git
533 commands. A handful of sample hooks are installed when
Junio C Hamanoba4b9282008-07-06 05:20:31534 <em>git-init</em> is run, but all of them are disabled by
Junio C Hamano116db352008-12-17 19:48:40535 default. To enable, the <tt>.sample</tt> suffix has to be
536 removed from the filename by renaming.
Junio C Hamanofce7c7e2008-07-02 03:06:38537 Read <a href="githooks.html">githooks(5)</a> for more details about
Junio C Hamanof7c042d2008-06-06 22:50:53538 each hook.
539</p>
540</dd>
541<dt>
542index
543</dt>
544<dd>
545<p>
546 The current index file for the repository. It is
547 usually not found in a bare repository.
548</p>
549</dd>
550<dt>
551info
552</dt>
553<dd>
554<p>
555 Additional information about the repository is recorded
556 in this directory.
557</p>
558</dd>
559<dt>
560info/refs
561</dt>
562<dd>
563<p>
564 This file helps dumb transports discover what refs are
565 available in this repository. If the repository is
566 published for dumb transports, this file should be
Junio C Hamanoba4b9282008-07-06 05:20:31567 regenerated by <em>git-update-server-info</em> every time a tag
Junio C Hamanof7c042d2008-06-06 22:50:53568 or branch is created or modified. This is normally done
569 from the <tt>hooks/update</tt> hook, which is run by the
Junio C Hamanoba4b9282008-07-06 05:20:31570 <em>git-receive-pack</em> command when you <em>git-push</em> into the
Junio C Hamanof7c042d2008-06-06 22:50:53571 repository.
572</p>
573</dd>
574<dt>
575info/grafts
576</dt>
577<dd>
578<p>
579 This file records fake commit ancestry information, to
580 pretend the set of parents a commit has is different
581 from how the commit was actually created. One record
582 per line describes a commit and its fake parents by
583 listing their 40-byte hexadecimal object names separated
584 by a space and terminated by a newline.
585</p>
586</dd>
587<dt>
588info/exclude
589</dt>
590<dd>
591<p>
592 This file, by convention among Porcelains, stores the
593 exclude pattern list. <tt>.gitignore</tt> is the per-directory
Junio C Hamanoba4b9282008-07-06 05:20:31594 ignore file. <em>git-status</em>, <em>git-add</em>, <em>git-rm</em> and
595 <em>git-clean</em> look at it but the core git commands do not look
Junio C Hamanof7c042d2008-06-06 22:50:53596 at it. See also: <a href="gitignore.html">gitignore(5)</a>.
597</p>
598</dd>
599<dt>
600remotes
601</dt>
602<dd>
603<p>
604 Stores shorthands to be used to give URL and default
Junio C Hamanofce7c7e2008-07-02 03:06:38605 refnames to interact with remote repository to
Junio C Hamanoba4b9282008-07-06 05:20:31606 <em>git-fetch</em>, <em>git-pull</em> and <em>git-push</em> commands.
Junio C Hamanof7c042d2008-06-06 22:50:53607</p>
608</dd>
609<dt>
610logs
611</dt>
612<dd>
613<p>
614 Records of changes made to refs are stored in this
Junio C Hamanofce7c7e2008-07-02 03:06:38615 directory. See <a href="git-update-ref.html">git-update-ref(1)</a>
Junio C Hamanof7c042d2008-06-06 22:50:53616 for more information.
617</p>
618</dd>
619<dt>
620logs/refs/heads/<tt>name</tt>
621</dt>
622<dd>
623<p>
624 Records all changes made to the branch tip named <tt>name</tt>.
625</p>
626</dd>
627<dt>
628logs/refs/tags/<tt>name</tt>
629</dt>
630<dd>
631<p>
632 Records all changes made to the tag named <tt>name</tt>.
633</p>
634</dd>
635<dt>
636shallow
637</dt>
638<dd>
639<p>
640 This is similar to <tt>info/grafts</tt> but is internally used
641 and maintained by shallow clone mechanism. See <tt>--depth</tt>
642 option to <a href="git-clone.html">git-clone(1)</a> and <a href="git-fetch.html">git-fetch(1)</a>.
643</p>
644</dd>
Junio C Hamanoba4b9282008-07-06 05:20:31645</dl></div>
Junio C Hamanof7c042d2008-06-06 22:50:53646</div>
Junio C Hamanoba4b9282008-07-06 05:20:31647<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamanof7c042d2008-06-06 22:50:53648<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31649<div class="para"><p><a href="git-init.html">git-init(1)</a>,
Junio C Hamanof7c042d2008-06-06 22:50:53650<a href="git-clone.html">git-clone(1)</a>,
651<a href="git-fetch.html">git-fetch(1)</a>,
652<a href="git-pack-refs.html">git-pack-refs(1)</a>,
653<a href="git-gc.html">git-gc(1)</a>,
654<a href="git-checkout.html">git-checkout(1)</a>,
655<a href="gitglossary.html">gitglossary(7)</a>,
Junio C Hamanoba4b9282008-07-06 05:20:31656<a href="user-manual.html">The Git User's Manual</a></p></div>
Junio C Hamanof7c042d2008-06-06 22:50:53657</div>
Junio C Hamanoba4b9282008-07-06 05:20:31658<h2 id="_git">GIT</h2>
Junio C Hamanof7c042d2008-06-06 22:50:53659<div class="sectionbody">
Junio C Hamanoba4b9282008-07-06 05:20:31660<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite.</p></div>
Junio C Hamanof7c042d2008-06-06 22:50:53661</div>
662<div id="footer">
663<div id="footer-text">
Junio C Hamano116db352008-12-17 19:48:40664Last updated 2008-12-17 19:48:22 UTC
Junio C Hamanof7c042d2008-06-06 22:50:53665</div>
666</div>
667</body>
668</html>