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

Re: Submodules

From
SVSven Verdoolaege <skimo@kotnet.org>
Date
Aug 8, 2007, 10:41 UTC
Message-ID
<20070808104117.GK999MdfPADPa@greensroom.kotnet.org>
In-Reply-To
<a1bbc6950708071631w5d232e92gd0fa27158b27b5c3@mail.gmail.com>
On Tue, Aug 07, 2007 at 04:31:57PM -0700, Dmitry Kakurin wrote:
> This is exactly the level of details I'm talking about:
> * how come sumbodules are not initialized when I do a clone of super.
See you second question.
> I expect to be able to build super after I clone it. Is there a new
> (undocumented) flag to clone?
Not (yet).  Right now, you have to do

git submodule init git submodule update

after you clone to fetch and check-out all (first-level) submodules.
> * is it OK to *not* init a submodule? will super become unhappy? Can I
> do commits to super in this case?

Yes. No. Yes. In fact, only the "git submodule" subcommand are affected by a "git submodule init". Doing a "git submodule update" will actually check out the submodules and from then on, the HEAD of this checked-out submodule will be considered the content of the submodule in the working tree of the supermodule.

> * why submodules should be listed in 2 places: in .submodules and in
> super/.git/config?

It only has to be specified in .git/config. The value in .gitmodules (if present) is used by "git submodule init" as a default value for the one in .git/config.

skimo
Previous: Johannes SchindelinNext: Junio C Hamano
Message 8 of 19 in “Submodules”
  1. Dmitry KakurinAug 7, 2007
  2. Johannes SchindelinAug 7, 2007
  3. Dmitry KakurinAug 7, 2007
  4. Sven VerdoolaegeAug 8, 2007
  5. Johannes SchindelinAug 7, 2007
  6. Dmitry KakurinAug 7, 2007
  7. Johannes SchindelinAug 8, 2007
  8. Sven VerdoolaegeAug 8, 2007
  9. Junio C HamanoAug 8, 2007
  10. Johannes SchindelinAug 8, 2007
  11. Junio C HamanoAug 8, 2007
  12. Sven VerdoolaegeAug 8, 2007
  13. Junio C HamanoAug 8, 2007
  14. Johannes SchindelinAug 8, 2007
  15. Junio C HamanoAug 8, 2007
  16. Andy ParkinsAug 8, 2007
  17. Johannes SchindelinAug 8, 2007
  18. Sven VerdoolaegeAug 9, 2007
  19. Sven VerdoolaegeAug 8, 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.