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

Subtree merging of sub-directories between repositories?

From
Sskillzero@gmail.com <skillzero@gmail.com>
Date
Aug 2, 2009, 06:37 UTC
Message-ID
<2729632a0908012337l6d84ba76o81239d324ba11cf2@mail.gmail.com>

Is it possible to use the subtree merge strategy to import just one directory from a repository into a directory of a different repository? The subtree merge example describes bringing in an entire repository as a directory, but I'm not sure how to adapt that to just import part of the source repository. The repositories are completely different, but repository A has a couple directories I want to import into repository B (along with the history that affected those directories). I may also make changes on either side and it would be nice to be able to re-merge in either direction.

I was thinking I might need something like the git-subtree script, but maybe this can be done with standard git commands?

Next: Avery Pennarun
Message 1 of 4 in “Subtree merging of sub-directories between repositories?”
  1. skillzero@gmail.comAug 2, 2009
  2. Avery PennarunAug 2, 2009
  3. skillzero@gmail.comAug 2, 2009
  4. Avery PennarunAug 2, 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.