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.4.5" />
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.5em;
129 div
.content
{ /* Block element content. */
133 /* Block element titles. */
134 div
.title
, caption
.title
{
136 font-family: sans-serif
;
140 margin-bottom: 0.5em;
146 td div
.title:first-child
{
149 div
.content div
.title:first-child
{
152 div
.content
+ div
.title
{
156 div
.sidebarblock
> div
.content
{
158 border: 1px solid silver
;
162 div
.listingblock
> div
.content
{
163 border: 1px solid silver
;
172 div
.quoteblock
> div
.attribution
{
181 div
.verseblock
> div
.content
{
184 div
.verseblock
> div
.attribution
{
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div
.verseblock
+ div
.attribution
{
193 div
.admonitionblock
.icon
{
197 text-decoration: underline
;
199 padding-right: 0.5em;
201 div
.admonitionblock td
.content
{
203 border-left: 2px solid silver
;
206 div
.exampleblock
> div
.content
{
207 border-left: 2px solid silver
;
211 div
.imageblock div
.content
{ padding-left: 0; }
212 span
.image img
{ border-style: none
; }
213 a
.image:visited
{ color: white
; }
217 margin-bottom: 0.8em;
230 list-style-position: outside
;
233 list-style-type: decimal
;
236 list-style-type: lower-alpha
;
239 list-style-type: upper-alpha
;
242 list-style-type: lower-roman
;
245 list-style-type: upper-roman
;
248 div
.compact ul
, div
.compact ol
,
249 div
.compact p
, div
.compact p
,
250 div
.compact div
, div
.compact div
{
252 margin-bottom: 0.1em;
255 div
.tableblock
> table
{
256 border: 3px solid
#527bbd;
259 font-family: sans-serif
;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div
.tableblock
> table
[frame
="void"] {
275 div
.tableblock
> table
[frame
="hsides"] {
276 border-left-style: none
;
277 border-right-style: none
;
279 div
.tableblock
> table
[frame
="vsides"] {
280 border-top-style: none
;
281 border-bottom-style: none
;
287 margin-bottom: 0.8em;
290 padding-bottom: 15px;
292 dt
.hdlist1
.strong
, td
.hdlist1
.strong
{
298 padding-right: 0.8em;
304 div
.hdlist
.compact tr
{
314 div#footer-badges
{ display: none
; }
319 font-family: sans-serif
;
323 margin-bottom: 0.1em;
326 div
.toclevel1
, div
.toclevel2
, div
.toclevel3
, div
.toclevel4
{
342 /* Overrides for manpage documents */
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver
;
347 border-bottom: 2px solid silver
;
357 div#toc
{ display: none
; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div
.sidebar-content
{
364 border: 1px solid silver
;
367 div
.sidebar-title
, div
.image-title
{
369 font-family: sans-serif
;
372 margin-bottom: 0.5em;
375 div
.listingblock div
.content
{
376 border: 1px solid silver
;
381 div
.quoteblock-attribution
{
386 div
.verseblock-content
{
389 div
.verseblock-attribution
{
394 div
.exampleblock-content
{
395 border-left: 2px solid silver
;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc
a:visited
{ color: blue
; }
406 gitrepository-layout(
5) Manual Page
409 <div class=
"sectionbody">
410 <p>gitrepository-layout -
411 Git Repository Layout
415 <h2 id=
"_synopsis">SYNOPSIS
</h2>
416 <div class=
"sectionbody">
417 <div class=
"paragraph"><p>$GIT_DIR/*
</p></div>
419 <h2 id=
"_description">DESCRIPTION
</h2>
420 <div class=
"sectionbody">
421 <div class=
"paragraph"><p>You may find these things in your git repository (
<tt>.git
</tt>
422 directory for a repository associated with your working tree, or
423 <tt><project
>.git
</tt> directory for a public
<em>bare
</em> repository. It is
424 also possible to have a working tree where
<tt>.git
</tt> is a plain
425 ASCII file containing
<tt>gitdir:
<path
></tt>, i.e. the path to the
426 real git repository).
</p></div>
427 <div class=
"dlist"><dl>
433 Object store associated with this repository. Usually
434 an object store is self sufficient (i.e. all the objects
435 that are referred to by an object found in it are also
436 found in it), but there are couple of ways to violate
439 <div class=
"olist arabic"><ol class=
"arabic">
442 You could populate the repository by running a commit walker
443 without
<tt>-a
</tt> option. Depending on which options are given, you
444 could have only commit objects without associated blobs and
445 trees this way, for example. A repository with this kind of
446 incomplete object store is not suitable to be published to the
447 outside world but sometimes useful for private repository.
452 You also could have an incomplete but locally usable repository
453 by cloning shallowly. See
<a href=
"git-clone.html">git-clone(
1)
</a>.
458 You can be using
<tt>objects/info/alternates
</tt> mechanism, or
459 <tt>$GIT_ALTERNATE_OBJECT_DIRECTORIES
</tt> mechanism to
<em>borrow
</em>
460 objects from other object stores. A repository with this kind
461 of incomplete object store is not suitable to be published for
462 use with dumb transports but otherwise is OK as long as
463 <tt>objects/info/alternates
</tt> points at the right object stores
470 objects/[
0-
9a-f][
0-
9a-f]
474 Traditionally, each object is stored in its own file.
475 They are split into
256 subdirectories using the first
476 two letters from its object name to keep the number of
477 directory entries
<tt>objects
</tt> directory itself needs to
478 hold. Objects found here are often called
<em>unpacked
</em>
479 (or
<em>loose
</em>) objects.
487 Packs (files that store many object in compressed form,
488 along with index files to allow them to be randomly
489 accessed) are found in this directory.
497 Additional information about the object store is
498 recorded in this directory.
506 This file is to help dumb transports discover what packs
507 are available in this object store. Whenever a pack is
508 added or removed,
<tt>git update-server-info
</tt> should be run
509 to keep this file up-to-date if the repository is
510 published for dumb transports.
<em>git repack
</em> does this
515 objects/info/alternates
519 This file records paths to alternate object stores that
520 this object store borrows objects from, one pathname per
521 line. Note that not only native Git tools use it locally,
522 but the HTTP fetcher also tries to use it remotely; this
523 will usually work if you have relative paths (relative
524 to the object database, not to the repository!) in your
525 alternates file, but it will not work if you use absolute
526 paths unless the absolute path in filesystem and web URL
527 is the same. See also
<em>objects/info/http-alternates
</em>.
531 objects/info/http-alternates
535 This file records URLs to alternate object stores that
536 this object store borrows objects from, to be used when
537 the repository is fetched over HTTP.
545 References are stored in subdirectories of this
546 directory. The
<em>git prune
</em> command knows to keep
547 objects reachable from refs found in this directory and
552 refs/heads/
<tt>name
</tt>
556 records tip-of-the-tree commit objects of branch
<tt>name
</tt>
560 refs/tags/
<tt>name
</tt>
564 records any object name (not necessarily a commit
565 object, or a tag object that points at a commit object).
569 refs/remotes/
<tt>name
</tt>
573 records tip-of-the-tree commit objects of branches copied
574 from a remote repository.
582 records the same information as refs/heads/, refs/tags/,
583 and friends record in a more efficient way. See
584 <a href=
"git-pack-refs.html">git-pack-refs(
1)
</a>.
592 A symref (see glossary) to the
<tt>refs/heads/
</tt> namespace
593 describing the currently active branch. It does not mean
594 much if the repository is not associated with any working tree
595 (i.e. a
<em>bare
</em> repository), but a valid git repository
596 <strong>must
</strong> have the HEAD file; some porcelains may use it to
597 guess the designated
"default" branch of the repository
598 (usually
<em>master
</em>). It is legal if the named branch
599 <em>name
</em> does not (yet) exist. In some legacy setups, it is
600 a symbolic link instead of a symref that points at the current
603 <div class=
"paragraph"><p>HEAD can also record a specific commit directly, instead of
604 being a symref to point at the current branch. Such a state
605 is often called
<em>detached HEAD
</em>, and almost all commands work
606 identically as normal. See
<a href=
"git-checkout.html">git-checkout(
1)
</a> for
614 A slightly deprecated way to store shorthands to be used
615 to specify URL to
<em>git fetch
</em>,
<em>git pull
</em> and
<em>git push
</em>
616 commands is to store a file in
<tt>branches/
<name
></tt> and
617 give
<em>name
</em> to these commands in place of
<em>repository
</em>
626 Hooks are customization scripts used by various git
627 commands. A handful of sample hooks are installed when
628 <em>git init
</em> is run, but all of them are disabled by
629 default. To enable, the
<tt>.sample
</tt> suffix has to be
630 removed from the filename by renaming.
631 Read
<a href=
"githooks.html">githooks(
5)
</a> for more details about
640 The current index file for the repository. It is
641 usually not found in a bare repository.
649 Additional information about the repository is recorded
658 This file helps dumb transports discover what refs are
659 available in this repository. If the repository is
660 published for dumb transports, this file should be
661 regenerated by
<em>git update-server-info
</em> every time a tag
662 or branch is created or modified. This is normally done
663 from the
<tt>hooks/update
</tt> hook, which is run by the
664 <em>git-receive-pack
</em> command when you
<em>git push
</em> into the
673 This file records fake commit ancestry information, to
674 pretend the set of parents a commit has is different
675 from how the commit was actually created. One record
676 per line describes a commit and its fake parents by
677 listing their
40-byte hexadecimal object names separated
678 by a space and terminated by a newline.
686 This file, by convention among Porcelains, stores the
687 exclude pattern list.
<tt>.gitignore
</tt> is the per-directory
688 ignore file.
<em>git status
</em>,
<em>git add
</em>,
<em>git rm
</em> and
689 <em>git clean
</em> look at it but the core git commands do not look
690 at it. See also:
<a href=
"gitignore.html">gitignore(
5)
</a>.
698 Stores shorthands to be used to give URL and default
699 refnames to interact with remote repository to
700 <em>git fetch
</em>,
<em>git pull
</em> and
<em>git push
</em> commands.
708 Records of changes made to refs are stored in this
709 directory. See
<a href=
"git-update-ref.html">git-update-ref(
1)
</a>
710 for more information.
714 logs/refs/heads/
<tt>name
</tt>
718 Records all changes made to the branch tip named
<tt>name
</tt>.
722 logs/refs/tags/
<tt>name
</tt>
726 Records all changes made to the tag named
<tt>name
</tt>.
734 This is similar to
<tt>info/grafts
</tt> but is internally used
735 and maintained by shallow clone mechanism. See
<tt>--depth
</tt>
736 option to
<a href=
"git-clone.html">git-clone(
1)
</a> and
<a href=
"git-fetch.html">git-fetch(
1)
</a>.
741 <h2 id=
"_see_also">SEE ALSO
</h2>
742 <div class=
"sectionbody">
743 <div class=
"paragraph"><p><a href=
"git-init.html">git-init(
1)
</a>,
744 <a href=
"git-clone.html">git-clone(
1)
</a>,
745 <a href=
"git-fetch.html">git-fetch(
1)
</a>,
746 <a href=
"git-pack-refs.html">git-pack-refs(
1)
</a>,
747 <a href=
"git-gc.html">git-gc(
1)
</a>,
748 <a href=
"git-checkout.html">git-checkout(
1)
</a>,
749 <a href=
"gitglossary.html">gitglossary(
7)
</a>,
750 <a href=
"user-manual.html">The Git User
’s Manual
</a></p></div>
752 <h2 id=
"_git">GIT
</h2>
753 <div class=
"sectionbody">
754 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite.
</p></div>
757 <div id=
"footer-text">
758 Last updated
2010-
08-
18 22:
14:
44 UTC