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
29       submodule.<name>.update
30           Defines what to do when the submodule is updated by the
31           superproject. If checkout (the default), the new commit specified
32           in the superproject will be checked out in the submodule on a
33           detached HEAD. If rebase, the current branch of the submodule will
34           be rebased onto the commit specified in the superproject. If merge,
35           the commit specified in the superproject will be merged into the
36           current branch in the submodule. This config option is overridden
37           if git submodule update is given the --merge or --rebase options.
38

EXAMPLES

40       Consider the following .gitmodules file:
41
42           [submodule "libfoo"]
43                   path = include/foo
44                   url = git://foo.com/git/lib.git
45
46           [submodule "libbar"]
47                   path = include/bar
48                   url = git://bar.com/git/lib.git
49
50       This defines two submodules, libfoo and libbar. These are expected to
51       be checked out in the paths include/foo and include/bar, and for both
52       submodules an url is specified which can be used for cloning the
53       submodules.
54

SEE ALSO

56       git-submodule(1) git-config(1)
57

DOCUMENTATION

59       Documentation by Lars Hjemli <hjemli@gmail.com[1]>
60

GIT

62       Part of the git(1) suite
63

NOTES

65        1. hjemli@gmail.com
66           mailto:hjemli@gmail.com
67
68
69
70Git 1.7.1                         08/16/2017                     GITMODULES(5)
Impressum