git submodule add <repository> [path]

Add the given repository as a submodule at the given path to the changeset to be committed next to the current project

Arguments

NameDescription
repository
pathfilepaths

Options

NameDescription
-b <branch>Branch of repository to add as submodule
-f, --forceAllow adding an otherwise ignored submodule path
--name <name>It sets the submodule’s name to the given string instead of defaulting to its path
--reference <repository>Remote repository to be cloned
--depth <depth>Create a shallow clone with a history truncated to the specified number of revisions
--End of subcommand options