1gitmodules(5) 2============= 3 4NAME 5---- 6gitmodules - defining submodule properties 7 8SYNOPSIS 9-------- 10$GIT_WORK_DIR/.gitmodules 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 linkgit: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 33submodule.<name>.rebase:: 34 Defines that the submodule should be rebased by default. 35 36 37EXAMPLES 38-------- 39 40Consider 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 51This defines two submodules, `libfoo` and `libbar`. These are expected to 52be checked out in the paths 'include/foo' and 'include/bar', and for both 53submodules an url is specified which can be used for cloning the submodules. 54 55SEE ALSO 56-------- 57linkgit:git-submodule[1] linkgit:git-config[1] 58 59DOCUMENTATION 60------------- 61Documentation by Lars Hjemli <hjemli@gmail.com> 62 63GIT 64--- 65Part of the linkgit:git[1] suite