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

Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?

From
Алексей Шумкин <zapped@mail.ru>
Date
Jan 11, 2011, 12:33 UTC
Message-ID
<76067992.20110111153329@mail.ru>
In-Reply-To
<20110111114943.40890@gmx.net>

Thank you for the answer, but it's not what I want )) Applying patches is the same as rebasing, I guess. But I do not want to change v2.5-repo (let's call it so) that much. I'd like to know is there any method (low-level I suppose, as far as Git manages tree-objects as files) to make v2.4 LAST commit to be the parent of v2.5 FIRST commit?

MK> It's possible with a little arts an crafts. MK> You have 2 friends: git format-patch & git am . MK> With "git format-patch" you will see what a branch really is: MK> a serie of patches. With "git am" you can apply these patches MK> to a branch created on the correct point of the commit-history . E MK> voila the branch is recreated in the repository.

MK> In your case:

MK> On the 2.5 repository master branch: MK> git format-patch INITIAL_COMMITID

MK> On the 2.4 repository master branch: MK> git branch 2.5 MK> git checkout 2.4 MK> git reset --hard INITIAL_COMMITID MK> cat *.patch | git am

MK> E voila you habe both branches in a single repository.

MK> Nearly same procedure for every branch of the 2.5 repository MK> git checkout branchname MK> git format-patch master

MK> In the 2.4(Contains now both branches.) respository: MK> git checkout 2.5 MK> git branch branchname MK> git reset --hard CORRECT_BRANCHBASE MK> cat *.patch | git am

Previous: Martin KrügerNext: Andreas Ericsson
Message 3 of 18 in “Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?”
  1. Алексей ШумкинJan 11, 2011
  2. Martin KrügerJan 11, 2011
  3. Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?Алексей Шумкин, Jan 11, 2011
  4. Andreas EricssonJan 11, 2011
  5. Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?Алексей Шумкин, Jan 11, 2011
  6. Martin KrügerJan 11, 2011
  7. Jakub NarebskiJan 11, 2011
  8. Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?Алексей Шумкин, Jan 11, 2011
  9. Re[2]: Merge two different repositories (v2.4 + v2.5) into the one (v2.4 -> v2.5). Possible?Алексей Шумкин, Jan 11, 2011
  10. Documentation: start to explain what git replace is forJonathan Nieder, Jan 12, 2011
  11. MaaartinJan 12, 2011
  12. Alexey ShumkinJan 13, 2011
  13. 2/1 fixup! Documentation: start to explain what git replace is forJonathan Nieder, Jan 14, 2011
  14. Maaartin-1Jan 14, 2011
  15. Jonathan NiederJan 14, 2011
  16. how multiple roots happen (Re: [RFC/PATCH 2/1] fixup! Documentation: start to explain what git replace is for)Jonathan Nieder, Jan 14, 2011
  17. Jakub NarebskiJan 14, 2011
  18. Maaartin-1Jan 15, 2011

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.