1GITMODULES(5)                     Git Manual                     GITMODULES(5)
2
3
4

NAME

6       gitmodules - defining submodule properties
7

SYNOPSIS

9       $GIT_WORK_DIR/.gitmodules
10

DESCRIPTION

12       The .gitmodules file, located in the top-level directory of a git
13       working tree, is a text file with a syntax matching the requirements of
14       git-config(1).
15
16       The file contains one subsection per submodule, and the subsection
17       value is the name of the submodule. Each submodule section also
18       contains the following required keys:
19
20       submodule.<name>.path
21           Defines the path, relative to the top-level directory of the git
22           working tree, where the submodule is expected to be checked out.
23           The path name must not end with a /. All submodule paths must be
24           unique within the .gitmodules file.
25
26       submodule.<name>.url
27           Defines an url from where the submodule repository can be cloned.
28           This may be either an absolute URL ready to be passed to git-
29           clone(1) or (if it begins with ./ or ../) a location relative to
30           the superproject’s origin repository.
31
32       submodule.<name>.update
33           Defines what to do when the submodule is updated by the
34           superproject. If checkout (the default), the new commit specified
35           in the superproject will be checked out in the submodule on a
36           detached HEAD. If rebase, the current branch of the submodule will
37           be rebased onto the commit specified in the superproject. If merge,
38           the commit specified in the superproject will be merged into the
39           current branch in the submodule. This config option is overridden
40           if git submodule update is given the --merge or --rebase options.
41
42       submodule.<name>.fetchRecurseSubmodules
43           This option can be used to enable/disable recursive fetching of
44           this submodule. If this option is also present in the submodules
45           entry in .git/config of the superproject, the setting there will
46           override the one found in .gitmodules. Both settings can be
47           overridden on the command line by using the
48           "--[no-]recurse-submodules" option to "git fetch" and "git pull"..
49
50       submodule.<name>.ignore
51           Defines under what circumstances "git status" and the diff family
52           show a submodule as modified. When set to "all", it will never be
53           considered modified, "dirty" will ignore all changes to the
54           submodules work tree and takes only differences between the HEAD of
55           the submodule and the commit recorded in the superproject into
56           account. "untracked" will additionally let submodules with modified
57           tracked files in their work tree show up. Using "none" (the default
58           when this option is not set) also shows submodules that have
59           untracked files in their work tree as changed. If this option is
60           also present in the submodules entry in .git/config of the
61           superproject, the setting there will override the one found in
62           .gitmodules. Both settings can be overridden on the command line by
63           using the "--ignore-submodule" option.
64

EXAMPLES

66       Consider the following .gitmodules file:
67
68           [submodule "libfoo"]
69                   path = include/foo
70                   url = git://foo.com/git/lib.git
71
72           [submodule "libbar"]
73                   path = include/bar
74                   url = git://bar.com/git/lib.git
75
76       This defines two submodules, libfoo and libbar. These are expected to
77       be checked out in the paths include/foo and include/bar, and for both
78       submodules an url is specified which can be used for cloning the
79       submodules.
80

SEE ALSO

82       git-submodule(1) git-config(1)
83

DOCUMENTATION

85       Documentation by Lars Hjemli <hjemli@gmail.com[1]>
86

GIT

88       Part of the git(1) suite
89

NOTES

91        1. hjemli@gmail.com
92           mailto:hjemli@gmail.com
93
94
95
96Git 1.7.4.4                       04/11/2011                     GITMODULES(5)
Impressum