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

Re: Git Submodule Usage Pattern

From
Avery Pennarun <apenwarr@gmail.com>
Date
Feb 16, 2010, 17:48 UTC
Message-ID
<32541b131002160948h317e71f5m2d2cb839470a38f1@mail.gmail.com>
In-Reply-To
<c115fd3c1002160639m113a3604wa6686bc613a7c202@mail.gmail.com>
On Tue, Feb 16, 2010 at 9:39 AM, Tim Visher <tim.visher@gmail.com> wrote:
Show 12 quoted lines
> Apparently, submodules are not configured on a per-repo basis, unless
> I'm totally misunderstanding something.  The .gitmodules file wants to
> be checked in just like .gitignore, etc.  I don't know if submodules
> will work correctly without syncing that between repos, either.  What
> I need is to have the submodule at work point at a different repo than
> the submodule at Home to avoid firewall issues.  Or for someone to
> suggest a different work flow that would allow me to have my main home
> repo point at GitHub using my private git:// address and the
> zen-and-art repo using it's public git:// clone address and then have
> my Work repo clone from GitHub around the firewall (or somewhere else,
> GitHub's http cloning is still pretty Janky) but then push to the
> Stick.
Three suggestions I can offer:
1) After running 'git submodule init', look in .git/config.  You can
change which repos the submodules point to from there, on a per-repo
basis, and not affect other people's checkouts.
2) Try using relative repo paths (like ../foo.git) in .gitmodules.
Then as long as your repositories are siblings of each other, if you
can check out one you can check out the other.
3) git-subtree (http://github.com/apenwarr/git-subtree) does not
exhibit this problem.
Have fun,
Avery
Previous: Tim VisherNext: Andreas Krey
Message 2 of 4 in “Git Submodule Usage Pattern”
  1. Tim VisherFeb 16, 2010
  2. Avery PennarunFeb 16, 2010
  3. Andreas KreyFeb 16, 2010
  4. Avery PennarunFeb 16, 2010

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.