]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/gitmodules.txt
test-lib: Remove 3 year old no-op --no-python option
[thirdparty/git.git] / Documentation / gitmodules.txt
CommitLineData
891dbc6e
LH
1gitmodules(5)
2=============
3
4NAME
5----
6gitmodules - defining submodule properties
7
8SYNOPSIS
9--------
e5b5c1d2 10$GIT_WORK_DIR/.gitmodules
891dbc6e
LH
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
5162e697 18of linkgit:git-config[1].
891dbc6e
LH
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
32948425
JH
33submodule.<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
42b49178
JH
38 the commit specified in the superproject. If 'merge', the commit
39 specified in the superproject will be merged into the current branch
40 in the submodule.
32948425 41 This config option is overridden if 'git submodule update' is given
42b49178 42 the '--merge' or '--rebase' options.
ca2cedba 43
891dbc6e
LH
44
45EXAMPLES
46--------
47
48Consider the following .gitmodules file:
49
50 [submodule "libfoo"]
51 path = include/foo
52 url = git://foo.com/git/lib.git
53
54 [submodule "libbar"]
55 path = include/bar
56 url = git://bar.com/git/lib.git
57
58
59This defines two submodules, `libfoo` and `libbar`. These are expected to
60be checked out in the paths 'include/foo' and 'include/bar', and for both
61submodules an url is specified which can be used for cloning the submodules.
62
63SEE ALSO
64--------
5162e697 65linkgit:git-submodule[1] linkgit:git-config[1]
891dbc6e
LH
66
67DOCUMENTATION
68-------------
69Documentation by Lars Hjemli <hjemli@gmail.com>
70
71GIT
72---
9e1f0a85 73Part of the linkgit:git[1] suite