Specify the repository to track. This can be a URL or a local file path.
If the repository is a super-project (a repository with submodules), the
location from which to clone submodules is dependent on whether the repository
is bare or non-bare (i.e. has a working directory).
- If the super-project is bare, the location of the submodules will be
taken from .gitmodules.
- If the super-project is not bare, it is assumed that the
repository has each of its submodules cloned and checked out appropriately.
Thus, the submodules will be taken directly from a path like
${SUPER_PROJECT_URL}/${SUBMODULE}
, rather than relying on
information from .gitmodules.
For a local URL/path to a super-project,
git rev-parse --is-bare-repository
is used to detect whether the super-project is bare or not.
For a remote URL to a super-project, the ending of the URL determines whether
a bare or non-bare repository is assumed:
- If the remote URL ends with /.git, a non-bare repository is
assumed.
- If the remote URL does NOT end with /.git, a bare
repository is assumed.