{"thread":{"id":"7725","subject":"Cloning of git-svn repos?","startedAt":"2007-04-18T09:29:16Z","lastAt":"2007-04-19T13:03:53Z","messageCount":3,"participants":["Robin H. Johnson","Steven Grimm","Sam Vilain"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"39756","messageId":"20070418092916.GI31488@curie-int.orbis-terrarum.net","threadId":"7725","inReplyTo":null,"subject":"Cloning of git-svn repos?","fromName":"Robin H. Johnson","fromEmail":"robbat2@gentoo.org","sentAt":"2007-04-18T09:29:16Z","receivedAt":"2007-04-18T09:29:16Z","isPatch":false,"sender":{"key":"robbat2@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/373898?v=4"},"body":"(This is completely unrelated to my previous posts about using git for\nGentoo, it's not the only placing I'm looking at implementing Git).\n\nIs there a sane and git-recommended way to clone repos created with\ngit-svn?\n\nIf I do: 'git-svn clone ....', and then git-clone of that directory, the\nsecond clone cannot use git-svn to follow the original SVN or feed stuff\nback to the original SVN.\n\nIf I create them separately (or by plain copying the first one to create\nthe second), then pulling between them works fine.\n\nThe copying just feels messy compared to the initial git-clone\nfunctionality.\n\n-- \nRobin Hugh Johnson\nGentoo Linux Developer & Council Member\nE-Mail     : robbat2@gentoo.org\nGnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85\n"},{"id":"39795","messageId":"462653AD.5060902@midwinter.com","threadId":"7725","inReplyTo":"20070418092916.GI31488@curie-int.orbis-terrarum.net","subject":"Re: Cloning of git-svn repos?","fromName":"Steven Grimm","fromEmail":"koreth@midwinter.com","sentAt":"2007-04-18T17:21:49Z","receivedAt":"2007-04-18T17:21:49Z","isPatch":false,"sender":{"key":"koreth@midwinter.com","avatar":"https://gravatar.com/avatar/71b4d2e8b62f168bdc9e9205341159e3567003b4f9e2127c617c5fa0a1f5bad2?d=mp&s=160"},"body":"Robin H. Johnson wrote:\n> Is there a sane and git-recommended way to clone repos created with\n> git-svn?\n>\n> If I do: 'git-svn clone ....', and then git-clone of that directory, the\n> second clone cannot use git-svn to follow the original SVN or feed stuff\n> back to the original SVN.\n>   \n\nThere is some git-svn-specific data in the .git directory that isn't \ncopied by git clone. You could perhaps get away with just copying that \n(some stuff in .git/config, and the .git/svn subdirectory) into a cloned \nchild.\n\nWhat I usually do instead is make a parent repository with git-svn, then \nclone that as needed. I have a cron job that does \"git-svn fetch\" in the \nparent periodically, so the child repositories can just update from the \nparent to stay current. When I want to commit to svn, I push to the \nparent repo (be careful here since git-svn can't create non-bare \nrepositories, so don't ever push to the currently checked-out branch in \nthe parent), git-reset the parent to whatever svn branch I want to check \ninto, merge the just-pushed change into the parent's current branch, \nthen do my git-svn dcommit.\n\nThat workflow could undoubtedly be made simpler. In particular, one \ncould use hooks in the parent repository to automatically do the \nreset-merge-dcommit dance. If you had that, then pushing to the parent \nwould immediately commit those changes to svn and there'd be little \nreason to want to do svn operations from the cloned children.\n\n-Steve\n"},{"id":"39895","messageId":"462768B9.5030102@vilain.net","threadId":"7725","inReplyTo":"20070418092916.GI31488@curie-int.orbis-terrarum.net","subject":"Re: Cloning of git-svn repos?","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2007-04-19T13:03:53Z","receivedAt":"2007-04-19T13:03:53Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Robin H. Johnson wrote:\n> (This is completely unrelated to my previous posts about using git for\n> Gentoo, it's not the only placing I'm looking at implementing Git).\n>\n> Is there a sane and git-recommended way to clone repos created with\n> git-svn?\n>\n> If I do: 'git-svn clone ....', and then git-clone of that directory, the\n> second clone cannot use git-svn to follow the original SVN or feed stuff\n> back to the original SVN.\n>   \n\nYou need to make sure to clone the remotes/ refs as well.  See\nhttp://utsl.gen.nz/talks/git-svn/intro.html#howto-track-svn\n\nSam.\n\n> If I create them separately (or by plain copying the first one to create\n> the second), then pulling between them works fine.\n>\n> The copying just feels messy compared to the initial git-clone\n> functionality.\n>\n>   \n"}]}