{"thread":{"id":"15589","subject":"Branches with git-svn","startedAt":"2008-09-19T10:15:01Z","lastAt":"2008-09-19T13:13:38Z","messageCount":4,"participants":["Xavier Claessens","Michael J Gruber","Björn Steinbrink"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"91104","messageId":"1221819302.6784.4.camel@zdra-laptop","threadId":"15589","inReplyTo":null,"subject":"Branches with git-svn","fromName":"Xavier Claessens","fromEmail":"xclaesse@gmail.com","sentAt":"2008-09-19T10:15:01Z","receivedAt":"2008-09-19T10:15:01Z","isPatch":false,"sender":{"key":"xclaesse@gmail.com","avatar":null},"body":"Hi,\n\nI created a git repository using \"git-svn clone <url>\" a long time ago.\nBut now I realise that I don't get SVN branches into my git repository.\nI see that the doc tells to use \"git clone -t tags -b branches -T trunk\n<url>\" to create the repository. If I create a new repository with that\ncommand, I get branches and tags.\n\nHowever I have lots of contributors having branches based on my git\nrepository. Is there a way to add SVN branch to my existing git repo?\n\nThanks!\n\nXavier Claessens.\n"},{"id":"91109","messageId":"48D39C7B.9020709@drmicha.warpmail.net","threadId":"15589","inReplyTo":"1221819302.6784.4.camel@zdra-laptop","subject":"Re: Branches with git-svn","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2008-09-19T12:35:07Z","receivedAt":"2008-09-19T12:35:07Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Xavier Claessens venit, vidit, dixit 19.09.2008 12:15:\n> Hi,\n> \n> I created a git repository using \"git-svn clone <url>\" a long time ago.\n> But now I realise that I don't get SVN branches into my git repository.\n> I see that the doc tells to use \"git clone -t tags -b branches -T trunk\n> <url>\" to create the repository. If I create a new repository with that\n> command, I get branches and tags.\n> \n> However I have lots of contributors having branches based on my git\n> repository. Is there a way to add SVN branch to my existing git repo?\n\nIf you haven't use those options back then, then what was the svn repo\nstructure - no trunk, just main?\nDid you change the structure now?\n\nIf you git-svn fetch from that new structure then all your new branches\netc. will show up as subdirectories, which is most certainly not what\nyou want.\n\nSo, what was the structure in svn like before, and have your\ncontributors based their branches on the mis-imported new structure already?\n\nMichael\n"},{"id":"91113","messageId":"20080919131045.GA14301@atjola.homenet","threadId":"15589","inReplyTo":"48D39C7B.9020709@drmicha.warpmail.net","subject":"Re: Branches with git-svn","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2008-09-19T13:10:45Z","receivedAt":"2008-09-19T13:10:45Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2008.09.19 14:35:07 +0200, Michael J Gruber wrote:\n> Xavier Claessens venit, vidit, dixit 19.09.2008 12:15:\n> > I created a git repository using \"git-svn clone <url>\" a long time ago.\n> > But now I realise that I don't get SVN branches into my git repository.\n> > I see that the doc tells to use \"git clone -t tags -b branches -T trunk\n> > <url>\" to create the repository. If I create a new repository with that\n> > command, I get branches and tags.\n> > \n> > However I have lots of contributors having branches based on my git\n> > repository. Is there a way to add SVN branch to my existing git repo?\n> \n> If you haven't use those options back then, then what was the svn repo\n> structure - no trunk, just main?\n> Did you change the structure now?\n\nNo, he was just using \"git svn clone svn://host/repo/trunk\", ie. single\nbranch tracking. We solved that on #git, adjusting the url and fetch\nline, as well as adding the branches and tags line in the svn-remote\nsection in the config.\n\nBjörn\n"},{"id":"91114","messageId":"1221830018.6784.12.camel@zdra-laptop","threadId":"15589","inReplyTo":"48D39C7B.9020709@drmicha.warpmail.net","subject":"Re: Branches with git-svn","fromName":"Xavier Claessens","fromEmail":"xclaesse@gmail.com","sentAt":"2008-09-19T13:13:38Z","receivedAt":"2008-09-19T13:13:38Z","isPatch":false,"sender":{"key":"xclaesse@gmail.com","avatar":null},"body":"On ven, 2008-09-19 at 14:35 +0200, Michael J Gruber wrote:\n> Xavier Claessens venit, vidit, dixit 19.09.2008 12:15:\n> > Hi,\n> > \n> > I created a git repository using \"git-svn clone <url>\" a long time ago.\n> > But now I realise that I don't get SVN branches into my git repository.\n> > I see that the doc tells to use \"git clone -t tags -b branches -T trunk\n> > <url>\" to create the repository. If I create a new repository with that\n> > command, I get branches and tags.\n> > \n> > However I have lots of contributors having branches based on my git\n> > repository. Is there a way to add SVN branch to my existing git repo?\n> \n> If you haven't use those options back then, then what was the svn repo\n> structure - no trunk, just main?\n> Did you change the structure now?\n> \n> If you git-svn fetch from that new structure then all your new branches\n> etc. will show up as subdirectories, which is most certainly not what\n> you want.\n> \n> So, what was the structure in svn like before, and have your\n> contributors based their branches on the mis-imported new structure already?\n\nHi,\n\nThanks for your email, but Björn Steinbrink on IRC solved my problem.\nFor the record what I did is:\n1) make a new \"git svn clone -t tags -b branches -T trunk <url>\"\n2) copy/past the description of the \"svn\" remote in .git/config from the\nnew clone into my old repository. Just replaced, in right part of the\nfetch line, \"trunk\" by \"git-svn\"\n3) \"git svn fetch\" imported all branches correctly based on the commits\nI already have.\n\nThanks to all git and git-svn developers to make my life easier!\n\nXavier Claessens.\n"}]}