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