git submodule update [path...]
Update the registered submodules to match what the superproject expects by cloning missing submodules, fetching missing commits in submodules and updating the working tree of the submodules
Arguments
Name | Description |
---|
path | filepaths |
Options
Name | Description |
---|
--init | Initialize all submodules for which 'git submodule init' has not been called so far before updating |
--remote | Instead of using the superproject’s recorded SHA-1 to update the submodule, use the status of the submodule’s remote-tracking branch |
-N, --no-fetch | Don’t fetch new objects from the remote site |
--no-recommend-shallow | Ignore the suggestions |
--recommend-shallow | The initial clone of a submodule will use the recommended submodule.<name>.shallow as provided by the .gitmodules file |
-f, --force | Throw away local changes in submodules when switching to a different commit; and always run a checkout operation in the submodule, even if the commit listed in the index of the containing repository matches the commit checked out in the submodule |
--checkout | The commit recorded in the superproject will be checked out in the submodule on a detached HEAD |
--rebase | The current branch of the submodule will be rebased onto the commit recorded in the superproject |
--merge | The commit recorded in the superproject will be merged into the current branch in the submodule |
--reference <repository> | Remote repository |
--depth <depth> | Create a shallow clone with a history truncated to the specified number of revisions |
--recursive | Traverse submodules recursively |
--jobs <n> | Clone new submodules in parallel with as many jobs |
--single-branch | Clone only one branch during update: HEAD or one specified by --branch |
--no-single-branch | Don't clone only one branch during update: HEAD or one specified by --branch |
-- | End of subcommand options |