Documentation / gitmodules.txton commit Merge branch 'maint' (7e2e69b)
   1gitmodules(5)
   2=============
   3
   4NAME
   5----
   6gitmodules - defining submodule properties
   7
   8SYNOPSIS
   9--------
  10gitmodules
  11
  12
  13DESCRIPTION
  14-----------
  15
  16The `.gitmodules` file, located in the top-level directory of a git
  17working tree, is a text file with a syntax matching the requirements
  18of gitlink:git-config[1].
  19
  20The file contains one subsection per submodule, and the subsection value
  21is the name of the submodule. Each submodule section also contains the
  22following required keys:
  23
  24submodule.<name>.path::
  25        Defines the path, relative to the top-level directory of the git
  26        working tree, where the submodule is expected to be checked out.
  27        The path name must not end with a `/`. All submodule paths must
  28        be unique within the .gitmodules file.
  29
  30submodule.<name>.url::
  31        Defines an url from where the submodule repository can be cloned.
  32
  33
  34EXAMPLES
  35--------
  36
  37Consider the following .gitmodules file:
  38
  39        [submodule "libfoo"]
  40                path = include/foo
  41                url = git://foo.com/git/lib.git
  42
  43        [submodule "libbar"]
  44                path = include/bar
  45                url = git://bar.com/git/lib.git
  46
  47
  48This defines two submodules, `libfoo` and `libbar`. These are expected to
  49be checked out in the paths 'include/foo' and 'include/bar', and for both
  50submodules an url is specified which can be used for cloning the submodules.
  51
  52SEE ALSO
  53--------
  54gitlink:git-submodule[1] gitlink:git-config[1]
  55
  56DOCUMENTATION
  57-------------
  58Documentation by Lars Hjemli <hjemli@gmail.com>
  59
  60GIT
  61---
  62Part of the gitlink:git[7] suite