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

How to manage multiple repos using submodules?

From
AWAndrew Wong <andrew.w@sohovfx.com>
Date
Apr 16, 2011, 16:45 UTC
Message-ID
<4DA9C7A7.4010503@sohovfx.com>

It seems like submodule isn't meant for this, but many people seems to use submodule to link many smaller repos together. With this setup, I imagine whenever someone pushed a small repo, they're /supposed/ to push the big repo as well. This way, if I simply update the big repo and do a "git status", git will tell me that which of the smaller repos are out of date. However, this is only reliable if everyone remembers to push the big repo. If someone pushed a smaller repo, but forgot to push the big repo, then I won't be aware that some of the smaller repos are out-of-date until I push.

I suppose one way is to do a check/auto-update with pre/post commit script to enforce that the big repo is always up-to-date. Another way is to use the "submodule foreach" to do a fetch and status on smaller ones, but this doesn't seem very elegant.

So, I'm wondering how do people who use submodules this way manage all their repos? Or how to (reliably) get a good sense of the state of the small repos? Or maybe I shouldn't be using submodules this way at all?

Next: Jonathan Nieder
Message 1 of 5 in “How to manage multiple repos using submodules?”
  1. Andrew WongApr 16, 2011
  2. Jonathan NiederApr 16, 2011
  3. Jonathan NiederApr 17, 2011
  4. Andrew WongApr 17, 2011
  5. Phil HordApr 19, 2011

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.