1 <!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">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8" />
6 <meta name=
"generator" content=
"AsciiDoc 8.5.2" />
7 <title>gitrepository-layout(
5)
</title>
8 <style type=
"text/css">
10 p
, li
, dt
, dd
, div
, pre
, h1
, h2
, h3
, h4
, h5
, h6
{
12 border: 1px solid red;
17 margin: 1em 5% 1em 5%;
22 text-decoration: underline
;
42 h1
, h2
, h3
, h4
, h5
, h6
{
44 font-family: sans-serif
;
51 border-bottom: 2px solid silver
;
69 border: 1px solid silver
;
88 font-family: sans-serif
;
94 span#revnumber
, span#revdate
, span#revremark
{
95 font-family: sans-serif
;
99 font-family: sans-serif
;
101 border-top: 2px solid silver
;
107 padding-bottom: 0.5em;
111 padding-bottom: 0.5em;
116 margin-bottom: 1.5em;
118 div
.tableblock
, div
.imageblock
, div
.exampleblock
, div
.verseblock
,
119 div
.quoteblock
, div
.literalblock
, div
.listingblock
, div
.sidebarblock
,
120 div
.admonitionblock
{
122 margin-bottom: 1.5em;
124 div
.admonitionblock
{
126 margin-bottom: 2.0em;
131 div
.content
{ /* Block element content. */
135 /* Block element titles. */
136 div
.title
, caption
.title
{
138 font-family: sans-serif
;
142 margin-bottom: 0.5em;
148 td div
.title:first-child
{
151 div
.content div
.title:first-child
{
154 div
.content
+ div
.title
{
158 div
.sidebarblock
> div
.content
{
160 border: 1px solid silver
;
164 div
.listingblock
> div
.content
{
165 border: 1px solid silver
;
170 div
.quoteblock
, div
.verseblock
{
174 border-left: 5px solid
#dddddd;
178 div
.quoteblock
> div
.attribution
{
183 div
.verseblock
> div
.content
{
186 div
.verseblock
> div
.attribution
{
190 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
191 div
.verseblock
+ div
.attribution
{
195 div
.admonitionblock
.icon
{
199 text-decoration: underline
;
201 padding-right: 0.5em;
203 div
.admonitionblock td
.content
{
205 border-left: 3px solid
#dddddd;
208 div
.exampleblock
> div
.content
{
209 border-left: 3px solid
#dddddd;
213 div
.imageblock div
.content
{ padding-left: 0; }
214 span
.image img
{ border-style: none
; }
215 a
.image:visited
{ color: white
; }
219 margin-bottom: 0.8em;
232 list-style-position: outside
;
235 list-style-type: decimal
;
238 list-style-type: lower-alpha
;
241 list-style-type: upper-alpha
;
244 list-style-type: lower-roman
;
247 list-style-type: upper-roman
;
250 div
.compact ul
, div
.compact ol
,
251 div
.compact p
, div
.compact p
,
252 div
.compact div
, div
.compact div
{
254 margin-bottom: 0.1em;
257 div
.tableblock
> table
{
258 border: 3px solid
#527bbd;
260 thead
, p
.table
.header
{
261 font-family: sans-serif
;
273 /* Because the table frame attribute is overriden by CSS in most browsers. */
274 div
.tableblock
> table
[frame
="void"] {
277 div
.tableblock
> table
[frame
="hsides"] {
278 border-left-style: none
;
279 border-right-style: none
;
281 div
.tableblock
> table
[frame
="vsides"] {
282 border-top-style: none
;
283 border-bottom-style: none
;
289 margin-bottom: 0.8em;
292 padding-bottom: 15px;
294 dt
.hdlist1
.strong
, td
.hdlist1
.strong
{
300 padding-right: 0.8em;
306 div
.hdlist
.compact tr
{
315 .footnote, .footnoteref {
319 span
.footnote
, span
.footnoteref
{
320 vertical-align: super
;
324 margin: 20px 0 20px 0;
328 #footnotes div
.footnote
{
334 border-top: 1px solid silver
;
344 div#footer-badges
{ display: none
; }
348 margin-bottom: 2.5em;
353 font-family: sans-serif
;
357 margin-bottom: 0.1em;
360 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
376 /* Overrides for manpage documents */
379 padding-bottom: 0.5em;
380 border-top: 2px solid silver
;
381 border-bottom: 2px solid silver
;
391 div#toc
{ display: none
; }
394 /* Workarounds for IE6's broken and incomplete CSS2. */
396 div
.sidebar-content
{
398 border: 1px solid silver
;
401 div
.sidebar-title
, div
.image-title
{
403 font-family: sans-serif
;
406 margin-bottom: 0.5em;
409 div
.listingblock div
.content
{
410 border: 1px solid silver
;
415 div
.quoteblock-attribution
{
420 div
.verseblock-content
{
423 div
.verseblock-attribution
{
428 div
.exampleblock-content
{
429 border-left: 3px solid
#dddddd;
433 /* IE6 sets dynamically generated links as visited. */
434 div#toc
a:visited
{ color: blue
; }
436 <script type=
"text/javascript">
438 window
.onload = function(){asciidoc
.footnotes();}
439 var asciidoc
= { // Namespace.
441 /////////////////////////////////////////////////////////////////////
442 // Table Of Contents generator
443 /////////////////////////////////////////////////////////////////////
445 /* Author: Mihai Bazon, September 2002
446 * http://students.infoiasi.ro/~mishoo
448 * Table Of Content generator
451 * Feel free to use this script under the terms of the GNU General Public
452 * License, as long as you do not remove or alter this notice.
455 /* modified by Troy D. Hanson, September 2006. License: GPL */
456 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
459 toc: function (toclevels
) {
461 function getText(el
) {
463 for (var i
= el
.firstChild
; i
!= null; i
= i
.nextSibling
) {
464 if (i
.nodeType
== 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
466 else if (i
.firstChild
!= null)
472 function TocEntry(el
, text
, toclevel
) {
475 this.toclevel
= toclevel
;
478 function tocEntries(el
, toclevels
) {
479 var result
= new Array
;
480 var re
= new RegExp('[hH]([2-'+(toclevels
+1)+'])');
481 // Function that scans the DOM tree for header elements (the DOM2
482 // nodeIterator API would be a better technique but not supported by all
484 var iterate = function (el
) {
485 for (var i
= el
.firstChild
; i
!= null; i
= i
.nextSibling
) {
486 if (i
.nodeType
== 1 /* Node.ELEMENT_NODE */) {
487 var mo
= re
.exec(i
.tagName
);
488 if (mo
&& (i
.getAttribute("class") || i
.getAttribute("className")) != "float") {
489 result
[result
.length
] = new TocEntry(i
, getText(i
), mo
[1]-1);
499 var toc
= document
.getElementById("toc");
500 var entries
= tocEntries(document
.getElementById("content"), toclevels
);
501 for (var i
= 0; i
< entries
.length
; ++i
) {
502 var entry
= entries
[i
];
503 if (entry
.element
.id
== "")
504 entry
.element
.id
= "_toc_" + i
;
505 var a
= document
.createElement("a");
506 a
.href
= "#" + entry
.element
.id
;
507 a
.appendChild(document
.createTextNode(entry
.text
));
508 var div
= document
.createElement("div");
510 div
.className
= "toclevel" + entry
.toclevel
;
511 toc
.appendChild(div
);
513 if (entries
.length
== 0)
514 toc
.parentNode
.removeChild(toc
);
518 /////////////////////////////////////////////////////////////////////
519 // Footnotes generator
520 /////////////////////////////////////////////////////////////////////
522 /* Based on footnote generation code from:
523 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
526 footnotes: function () {
527 var cont
= document
.getElementById("content");
528 var noteholder
= document
.getElementById("footnotes");
529 var spans
= cont
.getElementsByTagName("span");
532 for (i
=0; i
<spans
.length
; i
++) {
533 if (spans
[i
].className
== "footnote") {
535 // Use [\s\S] in place of . so multi-line matches work.
536 // Because JavaScript has no s (dotall) regex flag.
537 note
= spans
[i
].innerHTML
.match(/\s*\[([\s\S]*)]\s*/)[1];
538 noteholder
.innerHTML
+=
539 "<div class='footnote' id='_footnote_" + n
+ "'>" +
540 "<a href='#_footnoteref_" + n
+ "' title='Return to text'>" +
541 n
+ "</a>. " + note
+ "</div>";
543 "[<a id='_footnoteref_" + n
+ "' href='#_footnote_" + n
+
544 "' title='View footnote' class='footnote'>" + n
+ "</a>]";
545 var id
=spans
[i
].getAttribute("id");
546 if (id
!= null) refs
["#"+id
] = n
;
550 noteholder
.parentNode
.removeChild(noteholder
);
552 // Process footnoterefs.
553 for (i
=0; i
<spans
.length
; i
++) {
554 if (spans
[i
].className
== "footnoteref") {
555 var href
= spans
[i
].getElementsByTagName("a")[0].getAttribute("href");
556 href
= href
.match(/#.*/)[0]; // Because IE return full URL.
559 "[<a href='#_footnote_" + n
+
560 "' title='View footnote' class='footnote'>" + n
+ "</a>]";
573 gitrepository-layout(
5) Manual Page
576 <div class=
"sectionbody">
577 <p>gitrepository-layout -
578 Git Repository Layout
583 <h2 id=
"_synopsis">SYNOPSIS
</h2>
584 <div class=
"sectionbody">
585 <div class=
"paragraph"><p>$GIT_DIR/*
</p></div>
587 <h2 id=
"_description">DESCRIPTION
</h2>
588 <div class=
"sectionbody">
589 <div class=
"paragraph"><p>You may find these things in your git repository (
<tt>.git
</tt>
590 directory for a repository associated with your working tree, or
591 <tt><project
>.git
</tt> directory for a public
<em>bare
</em> repository. It is
592 also possible to have a working tree where
<tt>.git
</tt> is a plain
593 ASCII file containing
<tt>gitdir:
<path
></tt>, i.e. the path to the
594 real git repository).
</p></div>
595 <div class=
"dlist"><dl>
601 Object store associated with this repository. Usually
602 an object store is self sufficient (i.e. all the objects
603 that are referred to by an object found in it are also
604 found in it), but there are a few ways to violate it.
606 <div class=
"olist arabic"><ol class=
"arabic">
609 You could have an incomplete but locally usable repository
610 by creating a shallow clone. See
<a href=
"git-clone.html">git-clone(
1)
</a>.
615 You could be using the
<tt>objects/info/alternates
</tt> or
616 <tt>$GIT_ALTERNATE_OBJECT_DIRECTORIES
</tt> mechanisms to
<em>borrow
</em>
617 objects from other object stores. A repository with this kind
618 of incomplete object store is not suitable to be published for
619 use with dumb transports but otherwise is OK as long as
620 <tt>objects/info/alternates
</tt> points at the object stores it
627 objects/[
0-
9a-f][
0-
9a-f]
631 A newly created object is stored in its own file.
632 The objects are splayed over
256 subdirectories using
633 the first two characters of the sha1 object name to
634 keep the number of directory entries in
<tt>objects
</tt>
635 itself to a manageable number. Objects found
636 here are often called
<em>unpacked
</em> (or
<em>loose
</em>) objects.
644 Packs (files that store many object in compressed form,
645 along with index files to allow them to be randomly
646 accessed) are found in this directory.
654 Additional information about the object store is
655 recorded in this directory.
663 This file is to help dumb transports discover what packs
664 are available in this object store. Whenever a pack is
665 added or removed,
<tt>git update-server-info
</tt> should be run
666 to keep this file up-to-date if the repository is
667 published for dumb transports.
<em>git repack
</em> does this
672 objects/info/alternates
676 This file records paths to alternate object stores that
677 this object store borrows objects from, one pathname per
678 line. Note that not only native Git tools use it locally,
679 but the HTTP fetcher also tries to use it remotely; this
680 will usually work if you have relative paths (relative
681 to the object database, not to the repository!) in your
682 alternates file, but it will not work if you use absolute
683 paths unless the absolute path in filesystem and web URL
684 is the same. See also
<em>objects/info/http-alternates
</em>.
688 objects/info/http-alternates
692 This file records URLs to alternate object stores that
693 this object store borrows objects from, to be used when
694 the repository is fetched over HTTP.
702 References are stored in subdirectories of this
703 directory. The
<em>git prune
</em> command knows to preserve
704 objects reachable from refs found in this directory and
709 refs/heads/
<tt>name
</tt>
713 records tip-of-the-tree commit objects of branch
<tt>name
</tt>
717 refs/tags/
<tt>name
</tt>
721 records any object name (not necessarily a commit
722 object, or a tag object that points at a commit object).
726 refs/remotes/
<tt>name
</tt>
730 records tip-of-the-tree commit objects of branches copied
731 from a remote repository.
739 records the same information as refs/heads/, refs/tags/,
740 and friends record in a more efficient way. See
741 <a href=
"git-pack-refs.html">git-pack-refs(
1)
</a>.
749 A symref (see glossary) to the
<tt>refs/heads/
</tt> namespace
750 describing the currently active branch. It does not mean
751 much if the repository is not associated with any working tree
752 (i.e. a
<em>bare
</em> repository), but a valid git repository
753 <strong>must
</strong> have the HEAD file; some porcelains may use it to
754 guess the designated
"default" branch of the repository
755 (usually
<em>master
</em>). It is legal if the named branch
756 <em>name
</em> does not (yet) exist. In some legacy setups, it is
757 a symbolic link instead of a symref that points at the current
760 <div class=
"paragraph"><p>HEAD can also record a specific commit directly, instead of
761 being a symref to point at the current branch. Such a state
762 is often called
<em>detached HEAD.
</em> See
<a href=
"git-checkout.html">git-checkout(
1)
</a>
763 for details.
</p></div>
770 A slightly deprecated way to store shorthands to be used
771 to specify a URL to
<em>git fetch
</em>,
<em>git pull
</em> and
<em>git push
</em>.
772 A file can be stored as
<tt>branches/
<name
></tt> and then
773 <em>name
</em> can be given to these commands in place of
774 <em>repository
</em> argument. See the REMOTES section in
775 <a href=
"git-fetch.html">git-fetch(
1)
</a> for details. This mechanism is legacy
776 and not likely to be found in modern repositories.
784 Hooks are customization scripts used by various git
785 commands. A handful of sample hooks are installed when
786 <em>git init
</em> is run, but all of them are disabled by
787 default. To enable, the
<tt>.sample
</tt> suffix has to be
788 removed from the filename by renaming.
789 Read
<a href=
"githooks.html">githooks(
5)
</a> for more details about
798 The current index file for the repository. It is
799 usually not found in a bare repository.
807 Additional information about the repository is recorded
816 This file helps dumb transports discover what refs are
817 available in this repository. If the repository is
818 published for dumb transports, this file should be
819 regenerated by
<em>git update-server-info
</em> every time a tag
820 or branch is created or modified. This is normally done
821 from the
<tt>hooks/update
</tt> hook, which is run by the
822 <em>git-receive-pack
</em> command when you
<em>git push
</em> into the
831 This file records fake commit ancestry information, to
832 pretend the set of parents a commit has is different
833 from how the commit was actually created. One record
834 per line describes a commit and its fake parents by
835 listing their
40-byte hexadecimal object names separated
836 by a space and terminated by a newline.
844 This file, by convention among Porcelains, stores the
845 exclude pattern list.
<tt>.gitignore
</tt> is the per-directory
846 ignore file.
<em>git status
</em>,
<em>git add
</em>,
<em>git rm
</em> and
847 <em>git clean
</em> look at it but the core git commands do not look
848 at it. See also:
<a href=
"gitignore.html">gitignore(
5)
</a>.
856 Stores shorthands for URL and default refnames for use
857 when interacting with remote repositories via
<em>git fetch
</em>,
858 <em>git pull
</em> and
<em>git push
</em> commands. See the REMOTES section
859 in
<a href=
"git-fetch.html">git-fetch(
1)
</a> for details. This mechanism is legacy
860 and not likely to be found in modern repositories.
868 Records of changes made to refs are stored in this
869 directory. See
<a href=
"git-update-ref.html">git-update-ref(
1)
</a>
870 for more information.
874 logs/refs/heads/
<tt>name
</tt>
878 Records all changes made to the branch tip named
<tt>name
</tt>.
882 logs/refs/tags/
<tt>name
</tt>
886 Records all changes made to the tag named
<tt>name
</tt>.
894 This is similar to
<tt>info/grafts
</tt> but is internally used
895 and maintained by shallow clone mechanism. See
<tt>--depth
</tt>
896 option to
<a href=
"git-clone.html">git-clone(
1)
</a> and
<a href=
"git-fetch.html">git-fetch(
1)
</a>.
901 <h2 id=
"_see_also">SEE ALSO
</h2>
902 <div class=
"sectionbody">
903 <div class=
"paragraph"><p><a href=
"git-init.html">git-init(
1)
</a>,
904 <a href=
"git-clone.html">git-clone(
1)
</a>,
905 <a href=
"git-fetch.html">git-fetch(
1)
</a>,
906 <a href=
"git-pack-refs.html">git-pack-refs(
1)
</a>,
907 <a href=
"git-gc.html">git-gc(
1)
</a>,
908 <a href=
"git-checkout.html">git-checkout(
1)
</a>,
909 <a href=
"gitglossary.html">gitglossary(
7)
</a>,
910 <a href=
"user-manual.html">The Git User
’s Manual
</a></p></div>
912 <h2 id=
"_git">GIT
</h2>
913 <div class=
"sectionbody">
914 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite.
</p></div>
917 <div id=
"footnotes"><hr /></div>
919 <div id=
"footer-text">
920 Last updated
2011-
09-
21 23:
01:
14 PDT