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

Re: Merging submodules

From
SBSanti Béjar <sbejar@gmail.com>
Date
Jul 31, 2008, 13:17 UTC
Message-ID
<8aa486160807310617o1a1cf8ddtdee3a43c2835d552@mail.gmail.com>
In-Reply-To
<20080731143955.034f0577@pc09.procura.nl>
On Thu, Jul 31, 2008 at 14:39, H.Merijn Brand <h.m.brand@xs4all.nl> wrote:
Show 7 quoted lines
>
> There is a slight problem with this merging approach. The path names
> are as they are/were in the submodules. In module_a, foo.pl was without
> a leading module_a/ path, and now after integration, it still is. Is it
> possible to rethink this whole process that integrates/merges the
> several git repo's in subfolders into the current folder, as-if they
> would have been in this folder in the first place?

If you want to have module_a/foo.pl in the old commits you will need to rewrite the history, either with "git filter-branch" or fast-export/import, or importing again.

For the new commits it depends on how you would do them. If you modify and commit without these module subfolders (without the module_a/.git as your git-merge-mods does) then the new commits will have module_a/foo.pl. So at the end you will have a merge of all the mods (using the subtree strategy), and after that you will have a single project.

All depends in a few factors, if you have published the history (for the rewriting), if you want to have the module_# as independent projects (this way you can merge them in other projects),...

Santi
Previous: Petr Baudis
Message 18 of 18 in “Re: Merging submodules (was Re: Feature suggestion: git-hist)”
  1. Brian GernhardtJul 30, 2008
  2. H.Merijn BrandJul 31, 2008
  3. H.Merijn BrandJul 31, 2008
  4. Petr BaudisJul 31, 2008
  5. H.Merijn BrandJul 31, 2008
  6. Santi BéjarJul 31, 2008
  7. H.Merijn BrandJul 31, 2008
  8. Santi BéjarJul 31, 2008
  9. H.Merijn BrandJul 31, 2008
  10. H.Merijn BrandAug 1, 2008
  11. Santi BéjarAug 1, 2008
  12. H.Merijn BrandAug 1, 2008
  13. Santi BéjarAug 1, 2008
  14. H.Merijn BrandAug 4, 2008
  15. Petr BaudisAug 4, 2008
  16. H.Merijn BrandAug 4, 2008
  17. Petr BaudisAug 4, 2008
  18. Santi BéjarJul 31, 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.