@@ -15,7 +15,8 @@ SYNOPSIS
15
15
'git submodule' [--quiet] init [--] [<path>...]
16
16
'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase]
17
17
[--reference <repository>] [--merge] [--recursive] [--] [<path>...]
18
- 'git submodule' [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
18
+ 'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
19
+ [commit] [--] [<path>...]
19
20
'git submodule' [--quiet] foreach [--recursive] <command>
20
21
'git submodule' [--quiet] sync [--] [<path>...]
21
22
@@ -106,8 +107,13 @@ status::
106
107
repository and `U` if the submodule has merge conflicts.
107
108
This command is the default command for 'git submodule'.
108
109
+
109
- If ' --recursive' is specified, this command will recurse into nested
110
+ If ` --recursive` is specified, this command will recurse into nested
110
111
submodules, and show their status as well.
112
+ +
113
+ If you are only interested in changes of the currently initialized
114
+ submodules with respect to the commit recorded in the index or the HEAD,
115
+ linkgit:git-status[1] and linkgit:git-diff[1] will provide that information
116
+ too (and can also report changes to a submodule's work tree).
111
117
112
118
init::
113
119
Initialize the submodules, i.e. register each submodule name
@@ -123,26 +129,29 @@ init::
123
129
update::
124
130
Update the registered submodules, i.e. clone missing submodules and
125
131
checkout the commit specified in the index of the containing repository.
126
- This will make the submodules HEAD be detached unless ' --rebase' or
127
- ' --merge' is specified or the key `submodule.$name.update` is set to
132
+ This will make the submodules HEAD be detached unless ` --rebase` or
133
+ ` --merge` is specified or the key `submodule.$name.update` is set to
128
134
`rebase` or `merge`.
129
135
+
130
136
If the submodule is not yet initialized, and you just want to use the
131
137
setting as stored in .gitmodules, you can automatically initialize the
132
- submodule with the --init option.
138
+ submodule with the ` --init` option.
133
139
+
134
- If ' --recursive' is specified, this command will recurse into the
140
+ If ` --recursive` is specified, this command will recurse into the
135
141
registered submodules, and update any nested submodules within.
136
142
137
143
summary::
138
144
Show commit summary between the given commit (defaults to HEAD) and
139
145
working tree/index. For a submodule in question, a series of commits
140
146
in the submodule between the given super project commit and the
141
- index or working tree (switched by --cached) are shown. If the option
142
- --files is given, show the series of commits in the submodule between
147
+ index or working tree (switched by ` --cached` ) are shown. If the option
148
+ ` --files` is given, show the series of commits in the submodule between
143
149
the index of the super project and the working tree of the submodule
144
- (this option doesn't allow to use the --cached option or to provide an
150
+ (this option doesn't allow to use the ` --cached` option or to provide an
145
151
explicit commit).
152
+ +
153
+ Using the `--submodule=log` option with linkgit:git-diff[1] will provide that
154
+ information too.
146
155
147
156
foreach::
148
157
Evaluates an arbitrary shell command in each checked out submodule.
@@ -153,9 +162,9 @@ foreach::
153
162
superproject, $sha1 is the commit as recorded in the superproject,
154
163
and $toplevel is the absolute path to the top-level of the superproject.
155
164
Any submodules defined in the superproject but not checked out are
156
- ignored by this command. Unless given --quiet, foreach prints the name
165
+ ignored by this command. Unless given ` --quiet` , foreach prints the name
157
166
of each submodule before evaluating the command.
158
- If --recursive is given, submodules are traversed recursively (i.e.
167
+ If ` --recursive` is given, submodules are traversed recursively (i.e.
159
168
the given shell command is evaluated in nested submodules as well).
160
169
A non-zero return from the command in any submodule causes
161
170
the processing to terminate. This can be overridden by adding '|| :'
@@ -233,13 +242,18 @@ OPTIONS
233
242
If the key `submodule.$name.update` is set to `rebase`, this option is
234
243
implicit.
235
244
245
+ --init::
246
+ This option is only valid for the update command.
247
+ Initialize all submodules for which "git submodule init" has not been
248
+ called so far before updating.
249
+
236
250
--reference <repository>::
237
251
This option is only valid for add and update commands. These
238
252
commands sometimes need to clone a remote repository. In this case,
239
253
this option will be passed to the linkgit:git-clone[1] command.
240
254
+
241
255
*NOTE*: Do *not* use this option unless you have read the note
242
- for linkgit:git-clone[1]'s --reference and --shared options carefully.
256
+ for linkgit:git-clone[1]'s ` --reference` and ` --shared` options carefully.
243
257
244
258
--recursive::
245
259
This option is only valid for foreach, update and status commands.
0 commit comments