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

Re: A design for subrepositories

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 13, 2012, 17:30 UTC
Message-ID
<7vd30m2sbr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20121013163322.685276teuhqhjc82.lealanko@webmail.helsinki.fi>
"Lauri Alanko" <la@iki.fi> writes:
Show 14 quoted lines
> I intend to work on a "subrepository" tool for git, but before I
> embark on the actual programming, I thought to first invite comments
> on the general design.
>
> Some background first. I know that there are several existing
> approaches already for managing nested repositories, but none of them
> quite seems to fit my purposes. My primary goal is to use git for home
> directory backup and mirroring, while the home directory itself may of
> course contain repositories.
> ...
> Submodules are a bit closer to what I want, but they have clearly been
> designed for a different purpose: a repository with submodules is only
> supposed to collate existing repositories, not act as a source for
> them.

I have a repository that covers my home directory and some of its subdirectories have their own repositories.

I had my home directory and its subdirectories before Git ever existed, and I made my home directory and these subdirectories into separate, nested Git repositories fairly early after I started managing them with Git---way before submodules were invented. Now the subdirectory repositories are bound as submodules of the top level directory just fine.

I push these out for safekeeping purposes, all of my machines get their copies from here, and some submodules are not cloned to work machines (they house data of private nature). They are used just like you are expected to use submodules. In fact, this is pretty much vanilla use case of submodules, I think.

They _all_ originate from under my home directory, not "collating existing repositories" at all.

Have you considered how you can _extend_ submodules support to support your use case better? I think that would be a much more useful approach, as you are likely to get help from other people who do use submodules.

Previous: Lauri AlankoNext: Lauri Alanko
Message 2 of 17 in “A design for subrepositories”
  1. Lauri AlankoOct 13, 2012
  2. Junio C HamanoOct 13, 2012
  3. Lauri AlankoOct 13, 2012
  4. Junio C HamanoOct 14, 2012
  5. Lauri AlankoOct 14, 2012
  6. Jens LehmannOct 14, 2012
  7. Lauri AlankoOct 14, 2012
  8. Jens LehmannOct 14, 2012
  9. Jens LehmannOct 14, 2012
  10. Jens LehmannOct 14, 2012
  11. Junio C HamanoOct 14, 2012
  12. Jens LehmannOct 14, 2012
  13. A design for distributed submodulesLauri Alanko, Oct 19, 2012
  14. Jens LehmannOct 19, 2012
  15. Lauri AlankoOct 14, 2012
  16. Jens LehmannOct 15, 2012
  17. perryh@pluto.rain.comOct 13, 2012

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.