1GIT-SUBMODULE(1)                  Git Manual                  GIT-SUBMODULE(1)
2
3
4

NAME

6       git-submodule - Initialize, update or inspect submodules
7

SYNOPSIS

9           git-submodule [--quiet] [-b branch] add <repository> [<path>]
10           git-submodule [--quiet] [--cached] [status|init|update] [--] [<path>...]
11

COMMANDS

13       add
14           Add the given repository as a submodule at the given path to the
15           changeset to be committed next. In particular, the repository is
16           cloned at the specified path, added to the changeset and registered
17           in .gitmodules. If no path is specified, the path is deduced from
18           the repository specification.
19
20       status
21           Show the status of the submodules. This will print the SHA-1 of the
22           currently checked out commit for each submodule, along with the
23           submodule path and the output of git-describe(1) for the SHA-1.
24           Each SHA-1 will be prefixed with - if the submodule is not
25           initialized and + if the currently checked out submodule commit
26           does not match the SHA-1 found in the index of the containing
27           repository. This command is the default command for git-submodule.
28
29       init
30           Initialize the submodules, i.e. register in .git/config each
31           submodule name and url found in .gitmodules. The key used in
32           .git/config is submodule.$name.url. This command does not alter
33           existing information in .git/config.
34
35       update
36           Update the registered submodules, i.e. clone missing submodules and
37           checkout the commit specified in the index of the containing
38           repository. This will make the submodules HEAD be detached.
39

OPTIONS

41       -q, --quiet
42           Only print error messages.
43
44       -b, --branch
45           Branch of repository to add as submodule.
46
47       --cached
48           Display the SHA-1 stored in the index, not the SHA-1 of the
49           currently checked out submodule commit. This option is only valid
50           for the status command.
51
52       <path>
53           Path to submodule(s). When specified this will restrict the command
54           to only operate on the submodules found at the specified paths.
55

FILES

57       When initializing submodules, a .gitmodules file in the top-level
58       directory of the containing repository is used to find the url of each
59       submodule. This file should be formatted in the same way as
60       $GIR_DIR/config. The key to each submodule url is
61       "submodule.$name.url".
62

AUTHOR

64       Written by Lars Hjemli <hjemli@gmail.com>
65

GIT

67       Part of the git(7) suite
68
69
70
71
72Git 1.5.3.3                       10/09/2007                  GIT-SUBMODULE(1)
Impressum