Submodules

A submodule is a foreign repository that is embedded within a dedicated subdirectory of the repositories tree.

Repository.init_submodules()

init_submodule(submodules=None, overwrite=False)

Initialize all submodules in repository. submodules: List of submodules to initialize. Default argument initializes all submodules. overwrite: Flag indicating if initialization should overwrite submodule entries.

Repository.update_submodules(submodules=None, init=False)

Updates the specified submodules, or all if None are specified init: Flag indicating if submodules should be automatically initialized if necessary.

Repository.lookup_submodule(path)
Repository.listall_submodules() → [str, ...]

Return a list with all submodule paths in the repository.

The Submodule type

Submodule.open()

Open the repository for a submodule.

Submodule.name

Name of the submodule.

Submodule.path

Path of the submodule.

Submodule.url

URL of the submodule.

Submodule.branch

Branch that is to be tracked by the submodule.