{"thread":{"id":"21806","subject":"Transplant branch from another repository","startedAt":"2009-12-01T11:01:02Z","lastAt":"2009-12-01T16:07:35Z","messageCount":2,"participants":["Jeenu V","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128865","messageId":"5195c8760912010301r63d5e27axf53c17db799a798f@mail.gmail.com","threadId":"21806","inReplyTo":null,"subject":"Transplant branch from another repository","fromName":"Jeenu V","fromEmail":"jeenuv@gmail.com","sentAt":"2009-12-01T11:01:02Z","receivedAt":"2009-12-01T11:01:02Z","isPatch":false,"sender":{"key":"jeenuv@gmail.com","avatar":"https://gravatar.com/avatar/0fae51e727209ba442f53fbab775dec62add0884f7a1bf1eb9fee94fb876f2b0?d=mp&s=160"},"body":"Hi,\n\nSay, I have two repositories A and B (local, independent, but similar\n- they are for content tracking and not collaboration purposes). A has\na branch 'a', which I want to have in B. What I mean is that I'd like\nto have the sequence of changes in the branch 'a' to be present in B,\nthus creating an independent branch 'b' in B.\n\nIs there any way to achieve this? One thing that I could think of is\nto use 'format-patch' to generate the list of patch files from A. But\nI don't see how to convert those patches to a sequence of commits in\nrepo B. I could do a 'git apply patches/*' but then all patches\ncollapse to one single commit. If format-patch is a/the way, could\nsomebody tell me how to get this done? Or are there any alternatives?\n\nFWIW: I'm running Git under Cygwin, and sendmail isn't configured.\n\nThanks\nJeenu\n"},{"id":"128885","messageId":"4B153F47.5040504@drmicha.warpmail.net","threadId":"21806","inReplyTo":"5195c8760912010301r63d5e27axf53c17db799a798f@mail.gmail.com","subject":"Re: Transplant branch from another repository","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2009-12-01T16:07:35Z","receivedAt":"2009-12-01T16:07:35Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Jeenu V venit, vidit, dixit 01.12.2009 12:01:\n> Hi,\n> \n> Say, I have two repositories A and B (local, independent, but similar\n> - they are for content tracking and not collaboration purposes). A has\n> a branch 'a', which I want to have in B. What I mean is that I'd like\n> to have the sequence of changes in the branch 'a' to be present in B,\n> thus creating an independent branch 'b' in B.\n> \n> Is there any way to achieve this? One thing that I could think of is\n> to use 'format-patch' to generate the list of patch files from A. But\n> I don't see how to convert those patches to a sequence of commits in\n> repo B. I could do a 'git apply patches/*' but then all patches\n> collapse to one single commit. If format-patch is a/the way, could\n> somebody tell me how to get this done? Or are there any alternatives?\n> \n> FWIW: I'm running Git under Cygwin, and sendmail isn't configured.\n\n>From within your B repo:\n\ngit fetch pathtoA a:b\n\nCheers,\nMichael\n"}]}