submodule, repack: migrate to git-sh-setup's say()
[git/dscho.git] / Documentation / gitmodules.txt
blob1b67f0a9f12974afca2e8e6948d0fca564b9b17b
1 gitmodules(5)
2 =============
4 NAME
5 ----
6 gitmodules - defining submodule properties
8 SYNOPSIS
9 --------
10 $GIT_WORK_DIR/.gitmodules
13 DESCRIPTION
14 -----------
16 The `.gitmodules` file, located in the top-level directory of a git
17 working tree, is a text file with a syntax matching the requirements
18 of linkgit:git-config[1].
20 The file contains one subsection per submodule, and the subsection value
21 is the name of the submodule. Each submodule section also contains the
22 following required keys:
24 submodule.<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.
30 submodule.<name>.url::
31         Defines an url from where the submodule repository can be cloned.
33 submodule.<name>.update::
34         Defines what to do when the submodule is updated by the superproject.
35         If 'checkout' (the default), the new commit specified in the
36         superproject will be checked out in the submodule on a detached HEAD.
37         If 'rebase', the current branch of the submodule will be rebased onto
38         the commit specified in the superproject.
39         This config option is overridden if 'git submodule update' is given
40         the '--rebase' option.
43 EXAMPLES
44 --------
46 Consider the following .gitmodules file:
48         [submodule "libfoo"]
49                 path = include/foo
50                 url = git://foo.com/git/lib.git
52         [submodule "libbar"]
53                 path = include/bar
54                 url = git://bar.com/git/lib.git
57 This defines two submodules, `libfoo` and `libbar`. These are expected to
58 be checked out in the paths 'include/foo' and 'include/bar', and for both
59 submodules an url is specified which can be used for cloning the submodules.
61 SEE ALSO
62 --------
63 linkgit:git-submodule[1] linkgit:git-config[1]
65 DOCUMENTATION
66 -------------
67 Documentation by Lars Hjemli <hjemli@gmail.com>
69 GIT
70 ---
71 Part of the linkgit:git[1] suite