Merge branch 'fc/macos-x-clipped-write' into maint
[gitweb.git] / Documentation / gitrepository-layout.txt
index 5f8d5456fa7427566d209875a44b1be9d8cae637..aa03882ddb119d2e61da50079a72e1a6ab12f636 100644 (file)
@@ -12,12 +12,24 @@ $GIT_DIR/*
 DESCRIPTION
 -----------
 
-You may find these things in your Git repository (`.git`
-directory for a repository associated with your working tree, or
-`<project>.git` directory for a public 'bare' repository. It is
-also possible to have a working tree where `.git` is a plain
-ASCII file containing `gitdir: <path>`, i.e. the path to the
-real Git repository).
+A Git repository comes in two different flavours:
+
+ * a `.git` directory at the root of the working tree;
+
+ * a `<project>.git` directory that is a 'bare' repository
+   (i.e. without its own working tree), that is typically used for
+   exchanging histories with others by pushing into it and fetching
+   from it.
+
+*Note*: Also you can have a plain text file `.git` at the root of
+your working tree, containing `gitdir: <path>` to point at the real
+directory that has the repository.  This mechanism is often used for
+a working tree of a submodule checkout, to allow you in the
+containing superproject to `git checkout` a branch that does not
+have the submodule.  The `checkout` has to remove the entire
+submodule working tree, without losing the submodule repository.
+
+These things may exist in a Git repository.
 
 objects::
        Object store associated with this repository.  Usually
@@ -94,7 +106,7 @@ refs/remotes/`name`::
        from a remote repository.
 
 refs/replace/`<obj-sha1>`::
-       records the SHA1 of the object that replaces `<obj-sha1>`.
+       records the SHA-1 of the object that replaces `<obj-sha1>`.
        This is similar to info/grafts and is internally used and
        maintained by linkgit:git-replace[1]. Such refs can be exchanged
        between repositories while grafts are not.
@@ -172,6 +184,10 @@ info/exclude::
        'git clean' look at it but the core Git commands do not look
        at it.  See also: linkgit:gitignore[5].
 
+info/sparse-checkout::
+       This file stores sparse checkout patterns.
+       See also: linkgit:git-read-tree[1].
+
 remotes::
        Stores shorthands for URL and default refnames for use
        when interacting with remote repositories via 'git fetch',
@@ -195,6 +211,9 @@ shallow::
        and maintained by shallow clone mechanism.  See `--depth`
        option to linkgit:git-clone[1] and linkgit:git-fetch[1].
 
+modules::
+       Contains the git-repositories of the submodules.
+
 SEE ALSO
 --------
 linkgit:git-init[1],