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

Project's repository infrastructure (sunbtree and submodules)

From
Armen Baghumian <armen@opensourceclub.org>
Date
Jun 9, 2008, 15:12 UTC
Message-ID
<20080609194203.06698e01@debian>
Hi,

I have several projects which each project contains several modules. modules are shared between projects.

For example let say there is three modules A, B, and C, and two project called P1 and P2. P1 uses A and B modules and P2 uses B and C.

I want to have centralized place to clone/pull/push in P1 and P2 and it would be nice to push changes in modules(A,B,C) from projects (P1,P2) so when changes in B pushed from P1 it could be pulled from P2 (think B as a shared module between P1 and P2).

As far as modules are not big enough I don't want to push changes directly in to those repositories.

To solve the problem I just create three separated repositories for each modules (A,B,C) and create two other repositories for each project and use git-submodule to add modules in each repository.

pushing changes to modules(A,B,C) are really error prone and annoying so I searched for a better way to solve that problem.

Seems subtree merge[1] is other choice but I'm not sure.
1) What is best way to solve such situation?
2) If subtree is best choice how to push changes to modules(A,B,C) from
projects?
--Armen

[1] http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html

Next: Armen Baghumian
Message 1 of 3 in “Project's repository infrastructure (sunbtree and submodules)”
  1. Armen BaghumianJun 9, 2008
  2. Armen BaghumianJun 11, 2008
  3. Nigel MagnayJun 11, 2008

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.