Rebase the current branch onto the commit recorded in the
superproject. If this option is given, the submodule's HEAD will not
be detached. If a merge failure prevents this process, you will have
to resolve these failures with linkgit:git-rebase[1].
If the key `submodule.$name.update` is set to `rebase`, this option is
implicit.
--init::
This option is only valid for the update command.
Initialize all submodules for which "git submodule init" has not been
called so far before updating.
--name::
This option is only valid for the add command. It sets the submodule's
name to the given string instead of defaulting to its path. The name
must be valid as a directory name and may not end with a '/'.
--reference <repository>::
This option is only valid for add and update commands. These
commands sometimes need to clone a remote repository. In this case,
this option will be passed to the linkgit:git-clone[1] command.
+
*NOTE*: Do *not* use this option unless you have read the note
for linkgit:git-clone[1]'s `--reference`, `--shared`, and `--dissociate`
options carefully.
--dissociate::
This option is only valid for add and update commands. These
commands sometimes need to clone a remote repository. In this case,
this option will be passed to the linkgit:git-clone[1] command.
+
*NOTE*: see the NOTE for the `--reference` option.
--recursive::
This option is only valid for foreach, update, status and sync commands.
Traverse submodules recursively. The operation is performed not
only in the submodules of the current repo, but also
in any nested submodules inside those submodules (and so on).
--depth::
This option is valid for add and update commands. Create a 'shallow'
clone with a history truncated to the specified number of revisions.
See linkgit:git-clone[1]
--[no-]recommend-shallow::
This option is only valid for the update command.
The initial clone of a submodule will use the recommended
`submodule.<name>.shallow` as provided by the `.gitmodules` file
by default. To ignore the suggestions use `--no-recommend-shallow`.
-j <n>::
--jobs <n>::
This option is only valid for the update command.
Clone new submodules in parallel with as many jobs.
Defaults to the `submodule.fetchJobs` option.
--[no-]single-branch::
This option is only valid for the update command.
Clone only one branch during update: HEAD or one specified by --branch.
<path>...::
Paths to submodule(s). When specified this will restrict the command
to only operate on the submodules found at the specified paths.
(This argument is required with add).
FILES
-----
When initializing submodules, a `.gitmodules` file in the top-level directory
of the containing repository is used to find the url of each submodule.
This file should be formatted in the same way as `$GIT_DIR/config`. The key
to each submodule url is "submodule.$name.url". See linkgit:gitmodules[5]
for details.
SEE ALSO
--------
linkgit:gitsubmodules[7], linkgit:gitmodules[5].
GIT
---
Part of the linkgit:git[1] suite