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

Re: Projects within projects

From
Avery Pennarun <apenwarr@gmail.com>
Date
Oct 29, 2009, 18:56 UTC
Message-ID
<32541b130910291156w693a188dv6dfd0d39a506d145@mail.gmail.com>
In-Reply-To
<ab1d51700910291140ncd80027j4ee9a30637d7bc40@mail.gmail.com>
On Thu, Oct 29, 2009 at 2:40 PM, Nick Colgan <nick.colgan@gmail.com> wrote:
Show 14 quoted lines
> These are the current options I have in mind:
>
> 1. Create a separate repository for each sub-project and manage each
> separately in redmine (separate bug tracker, wiki, etc.)
>
> 2. Create a single repository with a subdirectory for each sub-project.
>
> 3. Use git submodules or subversion externals to combine options 1 and 2
> by creating a separate repo for each sub-project, then creating a master
> repo with subdirectory for each sub-project that imports from their
> respective repositories.
>
> What's the best way to handle this situation? Are git submodules and/or
> svn externals sufficiently capable of dealing with this?

Every way has tradeoffs. I'd suggest first thinking about whether these supposedly independent projects are *really* going to be independent or not. If they're unlikely to ever be reused - or they won't be for a long time - #2 is by far the easiest choice.

If you choose #2 and then choose to split the repo later, you can use git-subtree (http://github.com/apenwarr/git-subtree) to split it easily, so there's little sacrifice in using #2 at first and changing your mind later.

If you choose #3, that's exactly that git-submodule and svn:externals are for, and it seems to work okay for a lot of people. It's more work though, since you have to be careful to isolate commits between one project and another, etc. Personally I prefer to use git-subtree for this too, but it's a matter of preference.

Have fun,
Avery
Previous: Nick ColganNext: Bill Lear
Message 2 of 3 in “Projects within projects”
  1. Nick ColganOct 29, 2009
  2. Avery PennarunOct 29, 2009
  3. Bill LearOct 29, 2009

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.