git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Clarify role of init command in git-submodules documentation

From
MKmartin f. krafft <madduck@madduck.net>
Date
Aug 20, 2007, 07:09 UTC
Message-ID
<11875937841178-git-send-email-madduck@madduck.net>
In-Reply-To
<20070817103652.GK1070MdfPADPa@greensroom.kotnet.org>
As per the discussion in this thread:
  http://marc.info/?t=118721709500008&r=1&w=2

this patch updates the git-submodules documentation to make the situation a bit clearer and documents the intended workflow.

Signed-off-by: martin f. krafft <madduck@madduck.net>
---
 Documentation/git-submodule.txt |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
index 2c48936..8bc818a 100644
--- a/Documentation/git-submodule.txt
+++ b/Documentation/git-submodule.txt
@@ -32,15 +32,17 @@ status::
 	repository. This command is the default command for git-submodule.
 
 init::
-	Initialize the submodules, i.e. register in .git/config each submodule
-	name and url found in .gitmodules. The key used in .git/config is
-	`submodule.$name.url`. This command does not alter existing information
-	in .git/config.
+	Initialize the submodules, i.e. register in $GIT_DIR/config each
+	submodule name and url found in .gitmodules. The key used in
+	$GIT_DIR/config is `submodule.$name.url`. This command does not alter
+	existing information in $GIT_DIR/config, it only serves to initialise
+	the local configuration from the defaults in .gitmodules.
 
 update::
-	Update the registered submodules, i.e. clone missing submodules and
-	checkout the commit specified in the index of the containing repository.
-	This will make the submodules HEAD be detached.
+	Update the submodules registered in $GIT_DIR/config, i.e. clone
+	missing submodules and checkout the commit specified in the index of
+	the containing repository. This will make the submodules HEAD be
+	detached.
 
 
 OPTIONS
@@ -62,10 +64,16 @@ OPTIONS
 
 FILES
 -----
-When initializing submodules, a .gitmodules file in the top-level directory
-of the containing repository is used to find the url of each submodule.
-This file should be formatted in the same way as $GIR_DIR/config. The key
-to each submodule url is "submodule.$name.url".
+To work with submodules, a user has to prepare a repository clone with the
+command `git-submodule init`. This command copies the url of each submodule
+listed in the .gitmodules file in the top-level directory of the containing
+repository to $GIT_DIR/config. The key to each submodule url is
+"submodule.$name.url".
+
+The .gitmodules file then specifies the location of each submodule with
+respect to the repository (and is shared among all contributors), while the
+url of each submodule comes from the local configuration in $GIT_DIR/config
+and can thus be modified independently of all other users.
 
 
 AUTHOR
-- 
1.5.3.rc5.40.g2f82
Previous: Sven VerdoolaegeNext: Sven Verdoolaege
Message 5 of 13 in “clarify need for init in git-submodules documentation”
  1. clarify need for init in git-submodules documentationmartin f. krafft, Aug 16, 2007
  2. Sven VerdoolaegeAug 17, 2007
  3. martin f krafftAug 17, 2007
  4. Sven VerdoolaegeAug 17, 2007
  5. Clarify role of init command in git-submodules documentationmartin f. krafft, Aug 20, 2007
  6. Sven VerdoolaegeAug 20, 2007
  7. Junio C HamanoAug 20, 2007
  8. martin f krafftAug 21, 2007
  9. Sven VerdoolaegeAug 21, 2007
  10. martin f krafftAug 21, 2007
  11. Sven VerdoolaegeAug 22, 2007
  12. martin f krafftAug 22, 2007
  13. Not setting M-F-T, keeping people on Cc (was: [PATCH] clarify need for init in git-submodules documentation)martin f krafft, Aug 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.