From 3244eb9b5a6f0b5a06d20c06dbb34739fa3b043a Mon Sep 17 00:00:00 2001 From: "Dale R. Worley" Date: Wed, 15 May 2013 18:28:39 -0400 Subject: [PATCH] git-submodule.txt: Clarify 'init' and 'add' subcommands. Describe how 'add' sets the submodule's logical name, which is used in the configuration entry names. Clarify that 'init' only sets up the configuration entries for submodules that have already been added elsewhere. Describe that arguments limit the submodules that are configured. Signed-off-by: Dale Worley Acked-by: Jens Lehmann Signed-off-by: Junio C Hamano --- Documentation/git-submodule.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 74d5bdc59d..e5767134b1 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -77,6 +77,8 @@ argument is the relative location for the cloned submodule to exist in the superproject. If is not given, the "humanish" part of the source repository is used ("repo" for "/path/to/repo.git" and "foo" for "host.xz:foo/.git"). +The is also used as the submodule's logical name in its +configuration entries unless `--name` is used to specify a logical name. + is the URL of the new submodule's origin repository. This may be either an absolute URL, or (if it begins with ./ @@ -124,8 +126,10 @@ linkgit:git-status[1] and linkgit:git-diff[1] will provide that information too (and can also report changes to a submodule's work tree). init:: - Initialize the submodules, i.e. register each submodule name - and url found in .gitmodules into .git/config. + Initialize the submodules recorded in the index (which were + added and committed elsewhere) by copying submodule + names and urls from .gitmodules to .git/config. + Optional arguments limit which submodules will be initialized. It will also copy the value of `submodule.$name.update` into .git/config. The key used in .git/config is `submodule.$name.url`. -- 2.11.4.GIT