{"thread":{"id":"51102","subject":"Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","startedAt":"2019-05-15T14:52:40Z","lastAt":"2019-05-21T07:53:30Z","messageCount":8,"participants":["Piotr Krukowiecki","Ævar Arnfjörð Bjarmason","Elijah Newren","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"375630","messageId":"CAA01CsoJf+_-iowdm0EFWd52vOWE1Uo0GGZ55d3RyPJzg6gwgQ@mail.gmail.com","threadId":"51102","inReplyTo":null,"subject":"Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2019-05-15T14:52:26Z","receivedAt":"2019-05-15T14:52:40Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"Hello,\n\nI'm migrating two repositories from svn. I already did svn->git\nmigration (git-svn clone) and now have two git repositories.\n\nI would like to merge them into 1 git repository, but to merge also\nhistory - branches and tags.\n\nThe reason is that the svn repositories in fact represent one\n\"project\" - you had to download both of then, they are not useful\nseparately. Tags were applied to both repositories, also list of\nbranches is almost identical for both.\n\nSo right now I have:\n\n    - projectA:\n       master: r1, r4, r5, r7\n       branch1: r10, r11, r13\n    - projectB:\n       master: r2, r3, r6\n       branch1: r12, r14\n\nThe content of projectA and projectB is different (let's say projectA\nis in subfolder A and projectB is in subfolder B). So revisions on\nprojectA branches have only A folder, and revisions on projectB\nbranches have only B folder.\n\nBut I would like to have:\n\n    - projectAB:\n       master: r1', r2', r3', r4', r5', r6', r7'\n       branch1: r10', r11', r12', r13', r14'\n\nWhere all revisions have content from both projects. For example, the\nr5' should have the \"A\" folder content the same as r5, but also should\nhave \"B\" folder content the same as in r3 (because r3 was the last\ncommit to projectB (date-wise) before commit r5 to projectA).\n\nThere's additional difficulty of handling merges...\n\n\nAny suggestions on what's the best way to do it?\n\n\nCurrently I'm testing join-git-repos.py script\n(https://github.com/mbitsnbites/git-tools/blob/master/join-git-repos.py)\nbut it's slow, memory inefficient and handles \"master\" branch only...\n\n\nThanks,\n\n-- \nPiotr Krukowiecki\n"},{"id":"375632","messageId":"874l5vwxhw.fsf@evledraar.gmail.com","threadId":"51102","inReplyTo":"CAA01CsoJf+_-iowdm0EFWd52vOWE1Uo0GGZ55d3RyPJzg6gwgQ@mail.gmail.com","subject":"Re: Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-05-15T15:25:31Z","receivedAt":"2019-05-15T15:25:38Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, May 15 2019, Piotr Krukowiecki wrote:\n\n> Hello,\n>\n> I'm migrating two repositories from svn. I already did svn->git\n> migration (git-svn clone) and now have two git repositories.\n>\n> I would like to merge them into 1 git repository, but to merge also\n> history - branches and tags.\n>\n> The reason is that the svn repositories in fact represent one\n> \"project\" - you had to download both of then, they are not useful\n> separately. Tags were applied to both repositories, also list of\n> branches is almost identical for both.\n>\n> So right now I have:\n>\n>     - projectA:\n>        master: r1, r4, r5, r7\n>        branch1: r10, r11, r13\n>     - projectB:\n>        master: r2, r3, r6\n>        branch1: r12, r14\n>\n> The content of projectA and projectB is different (let's say projectA\n> is in subfolder A and projectB is in subfolder B). So revisions on\n> projectA branches have only A folder, and revisions on projectB\n> branches have only B folder.\n>\n> But I would like to have:\n>\n>     - projectAB:\n>        master: r1', r2', r3', r4', r5', r6', r7'\n>        branch1: r10', r11', r12', r13', r14'\n>\n> Where all revisions have content from both projects. For example, the\n> r5' should have the \"A\" folder content the same as r5, but also should\n> have \"B\" folder content the same as in r3 (because r3 was the last\n> commit to projectB (date-wise) before commit r5 to projectA).\n>\n> There's additional difficulty of handling merges...\n>\n>>\n> Any suggestions on what's the best way to do it?\n>\n>\n> Currently I'm testing join-git-repos.py script\n> (https://github.com/mbitsnbites/git-tools/blob/master/join-git-repos.py)\n> but it's slow, memory inefficient and handles \"master\" branch only...\n>\n>\n> Thanks,\n\nYou might be able to use https://github.com/newren/git-filter-repo\n\nBut I'd say try something even more stupid first:\n\n 1. Migrate repo A to Git\n 2. Migrate repo B to Git\n 3. \"git subtree add\" B's history to A\n 4. \"git rebase\" the history to linear-ize it\n\nAt this point you'll have A's history first, then B. Then run some\nscript to date order the commits, and just \"git cherry-pick\" those in\nthe order desired in a loop to a fresh history.\n\nMaybe that sort of stupidity will wreck your merges etc., so you might\nneed less stupid methods :)\n"},{"id":"375643","messageId":"CABPp-BGycoHEMN27Z9rAccT5yVRf3N50o4sc3wo8uE_HLR9QbA@mail.gmail.com","threadId":"51102","inReplyTo":"874l5vwxhw.fsf@evledraar.gmail.com","subject":"Re: Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2019-05-15T20:33:57Z","receivedAt":"2019-05-15T20:34:13Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Wed, May 15, 2019 at 8:30 AM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n>\n> On Wed, May 15 2019, Piotr Krukowiecki wrote:\n>\n> > Hello,\n> >\n> > I'm migrating two repositories from svn. I already did svn->git\n> > migration (git-svn clone) and now have two git repositories.\n> >\n> > I would like to merge them into 1 git repository, but to merge also\n> > history - branches and tags.\n> >\n> > The reason is that the svn repositories in fact represent one\n> > \"project\" - you had to download both of then, they are not useful\n> > separately. Tags were applied to both repositories, also list of\n> > branches is almost identical for both.\n> >\n> > So right now I have:\n> >\n> >     - projectA:\n> >        master: r1, r4, r5, r7\n> >        branch1: r10, r11, r13\n> >     - projectB:\n> >        master: r2, r3, r6\n> >        branch1: r12, r14\n> >\n> > The content of projectA and projectB is different (let's say projectA\n> > is in subfolder A and projectB is in subfolder B). So revisions on\n> > projectA branches have only A folder, and revisions on projectB\n> > branches have only B folder.\n> >\n> > But I would like to have:\n> >\n> >     - projectAB:\n> >        master: r1', r2', r3', r4', r5', r6', r7'\n> >        branch1: r10', r11', r12', r13', r14'\n> >\n> > Where all revisions have content from both projects. For example, the\n> > r5' should have the \"A\" folder content the same as r5, but also should\n> > have \"B\" folder content the same as in r3 (because r3 was the last\n> > commit to projectB (date-wise) before commit r5 to projectA).\n> >\n> > There's additional difficulty of handling merges...\n> >\n> >>\n> > Any suggestions on what's the best way to do it?\n> >\n> >\n> > Currently I'm testing join-git-repos.py script\n> > (https://github.com/mbitsnbites/git-tools/blob/master/join-git-repos.py)\n> > but it's slow, memory inefficient and handles \"master\" branch only...\n> >\n> >\n> > Thanks,\n>\n> You might be able to use https://github.com/newren/git-filter-repo\n\nSplicing repos is an interesting case, but unless the history is\nlinear and the branch/tag names exactly match and you are simplify\nweaving commits together based on timestamp within the same\nbranch/tag, then I don't know what algorithm should be used to weave\nthem together.  There are lots of choices, and \"correct\" may be very\nusecase-specific.\n\nThat said, filter-repo was designed to be usable as a library and has\na few simple examples of such usage, including one of splicing some\ntrivial repos together.  (See\nhttps://github.com/newren/git-filter-repo/blob/master/t/t9391/splice_repos.py\nand https://github.com/newren/git-filter-repo/blob/master/t/t9391-filter-repo-lib-usage.sh#L90-L121)\n As noted there, fast-export's diff against first parent handling\nmakes splicing commits into the second (or third) parent history of a\nmerge problematic as new files introduced in such locations would by\ndefault appear to get deleted by the merge unless additional work is\ndone to also insert the files there.  My example was meant as a simple\ntestcase that should be easy to inspect by others, so it just worked\nwith very short linear histories.\n\nSomewhat interestingly, a search on others having tried to solve this\nsame problem turned up\nhttps://github.com/j5int/jbosstools-gitmigration, which apparently is\nbased on git_fast_filter, which is the predecessor of filter-repo.\nPerhaps that tool would be useful to you as-is, though they apparently\ndo ignore merges.\n\nIf folks have a good idea for a weaving algorithm that appears\ngenerally useful rather than usecase-specific, then I may be\ninterested in coding it up as a more general example of using\nfilter-repo as a library.  But every time I've thought about it before\nit just sounded too hairy and too usecase specific so I've just punted\non it.\n\n> But I'd say try something even more stupid first:\n"},{"id":"375703","messageId":"CAA01CsrAPfE+hMwNMEF7epRcFQyhdeBxm9qSH=eF6v3kyyMu2w@mail.gmail.com","threadId":"51102","inReplyTo":"874l5vwxhw.fsf@evledraar.gmail.com","subject":"Re: Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2019-05-16T06:10:07Z","receivedAt":"2019-05-16T06:10:32Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Wed, May 15, 2019 at 5:25 PM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n>\n>\n> On Wed, May 15 2019, Piotr Krukowiecki wrote:\n>\n> > Hello,\n> >\n> > I'm migrating two repositories from svn. I already did svn->git\n> > migration (git-svn clone) and now have two git repositories.\n> >\n> > I would like to merge them into 1 git repository, but to merge also\n> > history - branches and tags.\n> >\n[...]\n> > There's additional difficulty of handling merges...\n> >\n> You might be able to use https://github.com/newren/git-filter-repo\n>\n> But I'd say try something even more stupid first:\n>\n>  1. Migrate repo A to Git\n>  2. Migrate repo B to Git\n>  3. \"git subtree add\" B's history to A\n>  4. \"git rebase\" the history to linear-ize it\n>\n> At this point you'll have A's history first, then B. Then run some\n> script to date order the commits, and just \"git cherry-pick\" those in\n> the order desired in a loop to a fresh history.\n>\n> Maybe that sort of stupidity will wreck your merges etc., so you might\n> need less stupid methods :)\n\nI think both git-filter-repo and the subtree+rebase do not handle\nbranches/merges well :(\n\n\n-- \nPiotr Krukowiecki\n"},{"id":"375704","messageId":"CAA01Csqu6g0QPLNG5LOnkSzN=-De5X=KnqyDS3Bqb980+_FQ+A@mail.gmail.com","threadId":"51102","inReplyTo":"CABPp-BGycoHEMN27Z9rAccT5yVRf3N50o4sc3wo8uE_HLR9QbA@mail.gmail.com","subject":"Re: Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2019-05-16T06:38:38Z","receivedAt":"2019-05-16T06:39:03Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Wed, May 15, 2019 at 10:34 PM Elijah Newren <newren@gmail.com> wrote:\n>\n> On Wed, May 15, 2019 at 8:30 AM Ævar Arnfjörð Bjarmason\n> <avarab@gmail.com> wrote:\n> >\n> > On Wed, May 15 2019, Piotr Krukowiecki wrote:\n> >\n> > > Hello,\n> > >\n> > > I'm migrating two repositories from svn. I already did svn->git\n> > > migration (git-svn clone) and now have two git repositories.\n> > >\n> > > I would like to merge them into 1 git repository, but to merge also\n> > > history - branches and tags.\n> > >\n> > > The reason is that the svn repositories in fact represent one\n> > > \"project\" - you had to download both of then, they are not useful\n> > > separately. Tags were applied to both repositories, also list of\n> > > branches is almost identical for both.\n> > >\n> > > So right now I have:\n> > >\n> > >     - projectA:\n> > >        master: r1, r4, r5, r7\n> > >        branch1: r10, r11, r13\n> > >     - projectB:\n> > >        master: r2, r3, r6\n> > >        branch1: r12, r14\n> > >\n> > > The content of projectA and projectB is different (let's say projectA\n> > > is in subfolder A and projectB is in subfolder B). So revisions on\n> > > projectA branches have only A folder, and revisions on projectB\n> > > branches have only B folder.\n> > >\n> > > But I would like to have:\n> > >\n> > >     - projectAB:\n> > >        master: r1', r2', r3', r4', r5', r6', r7'\n> > >        branch1: r10', r11', r12', r13', r14'\n> > >\n> > > Where all revisions have content from both projects. For example, the\n> > > r5' should have the \"A\" folder content the same as r5, but also should\n> > > have \"B\" folder content the same as in r3 (because r3 was the last\n> > > commit to projectB (date-wise) before commit r5 to projectA).\n> > >\n> > > There's additional difficulty of handling merges...\n> > >\n> > >>\n> > > Any suggestions on what's the best way to do it?\n> > >\n> > >\n> > > Currently I'm testing join-git-repos.py script\n> > > (https://github.com/mbitsnbites/git-tools/blob/master/join-git-repos.py)\n> > > but it's slow, memory inefficient and handles \"master\" branch only...\n> > >\n> > >\n> > > Thanks,\n> >\n> > You might be able to use https://github.com/newren/git-filter-repo\n>\n> Splicing repos is an interesting case, but unless the history is\n> linear and the branch/tag names exactly match and you are simplify\n> weaving commits together based on timestamp within the same\n> branch/tag, then I don't know what algorithm should be used to weave\n> them together.  There are lots of choices, and \"correct\" may be very\n> usecase-specific.\n>\n> That said, filter-repo was designed to be usable as a library and has\n> a few simple examples of such usage, including one of splicing some\n> trivial repos together.  (See\n> https://github.com/newren/git-filter-repo/blob/master/t/t9391/splice_repos.py\n> and https://github.com/newren/git-filter-repo/blob/master/t/t9391-filter-repo-lib-usage.sh#L90-L121)\n>  As noted there, fast-export's diff against first parent handling\n> makes splicing commits into the second (or third) parent history of a\n> merge problematic as new files introduced in such locations would by\n> default appear to get deleted by the merge unless additional work is\n> done to also insert the files there.  My example was meant as a simple\n> testcase that should be easy to inspect by others, so it just worked\n> with very short linear histories.\n>\n> Somewhat interestingly, a search on others having tried to solve this\n> same problem turned up\n> https://github.com/j5int/jbosstools-gitmigration, which apparently is\n> based on git_fast_filter, which is the predecessor of filter-repo.\n> Perhaps that tool would be useful to you as-is, though they apparently\n> do ignore merges.\n>\n> If folks have a good idea for a weaving algorithm that appears\n> generally useful rather than usecase-specific, then I may be\n> interested in coding it up as a more general example of using\n> filter-repo as a library.  But every time I've thought about it before\n> it just sounded too hairy and too usecase specific so I've just punted\n> on it.\n\nAt first I thought that joining history with branch/merge support\nshould be simple, but in fact it is not. At least for git repo. Now I\nthink it is impossible.\n\nIt should be possible for svn, or for git repo migrated from svn which\nstill has the git-svn-id string as part of commit message. So you know\nwhich branch any commit belongs.\n\nFor example:\n\nprojectA:\n- ra1 - ra3 - ra6 - ra9 * ra11       (master)\n      |                 |\n      - ra4 - ra7 - ra8 -            (branchX)\n\nprojectB:\n- rb2 - rb5 - rb10 -                 (master)\n\n\nMerged project AB should look like this:\n\nproject AB:\n- ra1 - rb2 - ra3 - rb5 - ra6 - ra9 - rb10 * ra11       (master)\n            |                              |\n            - ra4 - ra7 - ra8 --------------            (branch)\n\nBecause you know that rb5 was on branch \"master\" (trunk) then you know\nit should be applied to the same branch in projectA, but not to branch\n\"branchX\". This information is lost in git:\n\nprojectA (git):\n- ra1 - ra3 - ra6 - ra9 * ra11       (master)\n      |                 |\n      - ra4 - ra7 - ra8 -\n\nYou do not know which parent of ra11 represented the main \"master\"\nbranch. Should rb5 be added after between ra4 and ra7, or between ra3\nand ra6?\n\n\nDoes it make sense?\n\n\nMaybe I should look for a way to first prepare \"merged\" svn repo\nprojectAB. Maybe there's a tool which can do it. And then migrate it\nto svn.\n\n-- \nPiotr Krukowiecki\n"},{"id":"375802","messageId":"CAA01Csq0eX2L5cKpjjySs+4e0Sm+vp=10C_SAkE6CLpCHBWZ8g@mail.gmail.com","threadId":"51102","inReplyTo":"CAA01Csqu6g0QPLNG5LOnkSzN=-De5X=KnqyDS3Bqb980+_FQ+A@mail.gmail.com","subject":"Re: Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2019-05-17T13:08:01Z","receivedAt":"2019-05-17T13:08:14Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Thu, May 16, 2019 at 8:38 AM Piotr Krukowiecki\n<piotr.krukowiecki@gmail.com> wrote:\n>\n> On Wed, May 15, 2019 at 10:34 PM Elijah Newren <newren@gmail.com> wrote:\n> >\n> > On Wed, May 15, 2019 at 8:30 AM Ævar Arnfjörð Bjarmason\n> > <avarab@gmail.com> wrote:\n> > >\n> > > On Wed, May 15 2019, Piotr Krukowiecki wrote:\n> > >\n> > > > Hello,\n> > > >\n> > > > I'm migrating two repositories from svn. I already did svn->git\n> > > > migration (git-svn clone) and now have two git repositories.\n> > > >\n> > > > I would like to merge them into 1 git repository, but to merge also\n> > > > history - branches and tags.\n[...]\n> > > You might be able to use https://github.com/newren/git-filter-repo\n> >\n> > Splicing repos is an interesting case, but unless the history is\n> > linear and the branch/tag names exactly match and you are simplify\n> > weaving commits together based on timestamp within the same\n> > branch/tag, then I don't know what algorithm should be used to weave\n> > them together.  There are lots of choices, and \"correct\" may be very\n> > usecase-specific.\n> >\n> > That said, filter-repo was designed to be usable as a library and has\n> > a few simple examples of such usage, including one of splicing some\n> > trivial repos together.  (See\n> > https://github.com/newren/git-filter-repo/blob/master/t/t9391/splice_repos.py\n> > and https://github.com/newren/git-filter-repo/blob/master/t/t9391-filter-repo-lib-usage.sh#L90-L121)\n\nI'll try writing some script using the filter-repo. Looked at\nsplice_repos.py and fast-export/fast-import format and it looks\npromising / relatively simple.\n\n\n> > Somewhat interestingly, a search on others having tried to solve this\n> > same problem turned up\n> > https://github.com/j5int/jbosstools-gitmigration, which apparently is\n> > based on git_fast_filter, which is the predecessor of filter-repo.\n> > Perhaps that tool would be useful to you as-is, though they apparently\n> > do ignore merges.\n\nI tried using it but it didn't work. Don't remember what was the problem though.\n\n\n> Maybe I should look for a way to first prepare \"merged\" svn repo\n> projectAB. Maybe there's a tool which can do it. And then migrate it\n> to svn.\n\nI tried this - use svnadmin dump + svndumpfilter + svnadmin load to\nremodel svn repository and \"splice\" the history (by replacing 2nd\nproject paths to appear to be added to the 1st project path). But it\ndidn't work. The resulting svn repository had incorrect history (from\nmy point of view).\n\nI also looked at reposurgeon. Maybe it could do the splicing, but I\ngiven up on learning it, documentation isn't very helpful and there's\nnot enough examples in the internet...\n\n\n-- \nPiotr Krukowiecki\n"},{"id":"375922","messageId":"86a7fhp6yv.fsf@gmail.com","threadId":"51102","inReplyTo":"CABPp-BGycoHEMN27Z9rAccT5yVRf3N50o4sc3wo8uE_HLR9QbA@mail.gmail.com","subject":"Re: Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2019-05-20T13:54:00Z","receivedAt":"2019-05-20T13:54:46Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n> On Wed, May 15, 2019 at 8:30 AM Ævar Arnfjörð Bjarmason\n> <avarab@gmail.com> wrote:\n>> On Wed, May 15 2019, Piotr Krukowiecki wrote:\n>>>\n>>> I'm migrating two repositories from svn. I already did svn->git\n>>> migration (git-svn clone) and now have two git repositories.\n>>>\n>>> I would like to merge them into 1 git repository, but to merge also\n>>> history - branches and tags.\n>>>\n>>> The reason is that the svn repositories in fact represent one\n>>> \"project\" - you had to download both of then, they are not useful\n>>> separately. Tags were applied to both repositories, also list of\n>>> branches is almost identical for both.\n>>>\n>>> So right now I have:\n>>>\n>>>     - projectA:\n>>>        master: r1, r4, r5, r7\n>>>        branch1: r10, r11, r13\n>>>     - projectB:\n>>>        master: r2, r3, r6\n>>>        branch1: r12, r14\n>>>\n>>> The content of projectA and projectB is different (let's say projectA\n>>> is in subfolder A and projectB is in subfolder B). So revisions on\n>>> projectA branches have only A folder, and revisions on projectB\n>>> branches have only B folder.\n>>>\n>>> But I would like to have:\n>>>\n>>>     - projectAB:\n>>>        master: r1', r2', r3', r4', r5', r6', r7'\n>>>        branch1: r10', r11', r12', r13', r14'\n>>>\n>>> Where all revisions have content from both projects. For example, the\n>>> r5' should have the \"A\" folder content the same as r5, but also should\n>>> have \"B\" folder content the same as in r3 (because r3 was the last\n>>> commit to projectB (date-wise) before commit r5 to projectA).\n>>>\n>>> There's additional difficulty of handling merges...\n>>>\n>>>>\n>>> Any suggestions on what's the best way to do it?\n>>>\n>>>\n>>> Currently I'm testing join-git-repos.py script\n>>> (https://github.com/mbitsnbites/git-tools/blob/master/join-git-repos.py)\n>>> but it's slow, memory inefficient and handles \"master\" branch only...\n>>\n>> You might be able to use https://github.com/newren/git-filter-repo\n[...]\n\n> Somewhat interestingly, a search on others having tried to solve this\n> same problem turned up\n> https://github.com/j5int/jbosstools-gitmigration, which apparently is\n> based on git_fast_filter, which is the predecessor of filter-repo.\n> Perhaps that tool would be useful to you as-is, though they apparently\n> do ignore merges.\n\nThere is also reposurgeon tool; though its main purported purpose is to\naid migrating from one version control system to another, it can also be\nused to edit repositories (utilizing fast-import stream).\n\n  https://gitlab.com/esr/reposurgeon\n  http://www.catb.org/~esr/reposurgeon/\n\nHope that helps,\n--\nJakub Narębski\n"},{"id":"375983","messageId":"CAA01Csp+RpCXO4noewBOMY6qJiBy=Gshv3rUh83ZY2RJ5Th3Ww@mail.gmail.com","threadId":"51102","inReplyTo":"86a7fhp6yv.fsf@gmail.com","subject":"Re: Merging (joining/stiching/rewriting) history of \"unrelated\" git repositories","fromName":"Piotr Krukowiecki","fromEmail":"piotr.krukowiecki@gmail.com","sentAt":"2019-05-21T07:53:15Z","receivedAt":"2019-05-21T07:53:30Z","isPatch":false,"sender":{"key":"piotr.krukowiecki@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3259959?v=4"},"body":"On Mon, May 20, 2019 at 3:54 PM Jakub Narebski <jnareb@gmail.com> wrote:\n> There is also reposurgeon tool; though its main purported purpose is to\n> aid migrating from one version control system to another, it can also be\n> used to edit repositories (utilizing fast-import stream).\n>\n>   https://gitlab.com/esr/reposurgeon\n>   http://www.catb.org/~esr/reposurgeon/\n\nIf only there was real documentation for it...\n\n\n[resending in plain text...]\n\n-- \nPiotr Krukowiecki\n"}]}