- buster 1:2.20.1-2+deb10u3
- buster-backports 1:2.29.2-1~bpo10+1
- testing 1:2.30.2-1
- unstable 1:2.32.0-1
- experimental 1:2.32.0+next.20210606-1
GITMODULES(5) | Git Manual | GITMODULES(5) |
NAME¶
gitmodules - Defining submodule propertiesSYNOPSIS¶
$GIT_WORK_DIR/.gitmodulesDESCRIPTION¶
The .gitmodules file, located in the top-level directory of a Git working tree, is a text file with a syntax matching the requirements of git-config(1).The file contains one subsection per submodule, and the subsection value is the name of the submodule. The name is set to the path where the submodule has been added unless it was customized with the --name option of git submodule add. Each submodule section also contains the following required keys:
submodule.<name>.path
submodule.<name>.url
In addition, there are a number of optional keys:
submodule.<name>.update
submodule.<name>.branch
submodule.<name>.fetchRecurseSubmodules
submodule.<name>.ignore
all
dirty
untracked
none
If this option is also present in the submodules entry in .git/config of the superproject, the setting there will override the one found in .gitmodules.
Both settings can be overridden on the command line by using the "--ignore-submodules" option. The git submodule commands are not affected by this setting.
submodule.<name>.shallow
EXAMPLES¶
Consider the following .gitmodules file:[submodule "libfoo"] path = include/foo url = git://foo.com/git/lib.git [submodule "libbar"] path = include/bar url = git://bar.com/git/lib.git
This defines two submodules, libfoo and libbar. These are expected to be checked out in the paths include/foo and include/bar, and for both submodules a URL is specified which can be used for cloning the submodules.
SEE ALSO¶
git-submodule(1), gitsubmodules(7), git-config(1)GIT¶
Part of the git(1) suite12/03/2020 | Git 2.29.2 |