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

Re: cloning submodules with children submodules

From
PMPaul Martinolich <martinol@nrlssc.navy.mil>
Date
Nov 23, 2007, 20:35 UTC
Message-ID
<383F62AA-096E-4D8E-BCE8-B2B87507C596@nrlssc.navy.mil>
In-Reply-To
<20071123194904.GL2261MdfPADPa@greensroom.kotnet.org>
On Nov 23, 2007, at 1:49 PM, Sven Verdoolaege wrote:
> You didn't commit the change to mod_B to proj_one.
> Furthermore, you didn't push your changes to mod_B to
> the repo you specified for mod_B in .gitmodules.
Thanks for the help.
It works with the changes below.
Paul
I changed the creation of mod_b under mod_B to:
#  add mod_b to mod_B and push the changes back to mod_B

cd $GITDIR/proj_one/mod_B git submodule add $GITDIR/modules/mod_b git commit -m 'add module mod_b under module mod_B for project proj_one' git push

cd $GITDIR/proj_one git add mod_B git commit -m 'reflect module mod_B update for project proj_one' git status

and when I cloned it to:
#  clone the proj_one project (user user_a)

mkdir -p $GITDIR/user_a cd $GITDIR/user_a git clone $GITDIR/proj_one cd $GITDIR/user_a/proj_one

#  get mod_A and mod_B

git submodule init git submodule update

#  now get mod_b in mod_B

cd mod_B git submodule init git submodule update

Previous: Sven Verdoolaege
Message 3 of 3 in “cloning submodules with children submodules”
  1. Paul MartinolichNov 23, 2007
  2. Sven VerdoolaegeNov 23, 2007
  3. Paul MartinolichNov 23, 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.