{"thread":{"id":"27729","subject":"importing history","startedAt":"2011-06-29T13:45:14Z","lastAt":"2011-06-30T05:00:43Z","messageCount":6,"participants":["Mihamina Rakotomandimby","Christof Krüger","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"170666","messageId":"20110629164514.58175480.mihamina@bbs.mg","threadId":"27729","inReplyTo":null,"subject":"importing history","fromName":"Mihamina Rakotomandimby","fromEmail":"mihamina@bbs.mg","sentAt":"2011-06-29T13:45:14Z","receivedAt":"2011-06-29T13:45:14Z","isPatch":false,"sender":{"key":"mihamina@bbs.mg","avatar":null},"body":"Hi,\n\nStill newcomer in GIT ;-)\n\nLet the nurpawiki SVN repo here:\nhttp://code.google.com/p/nurpawiki/source/checkout\n\nI know how to clone it using \"git svn clone ...\"\n\"git log\" shows the whole history: fine!\n\nThen I created an account in a forge (like github or so...), where I\nhad to clone an empty GIT repository in order to begin to work.\nI dont have admin access to the forge, so no \"scp\" to the repo\nhosting possible.\n\nNow, I have 2 \"local\" repos:\n- the one from the SVN\n- the empty one from the forge\n\nI am looking for a document that would teach me how to \"import\" the\n\"from-svn\" into the empty one. What are the keywords for that action\n(to help me searching)?\n\nAfter I do that, I will just have to push to the previously empty\norigin and I'm done.\n\nThanks for your help.\n\n\n-- \nRMA.\n"},{"id":"170667","messageId":"348bd65ad7c7690bcce553fe3c8e0bfb.squirrel@mail.localhost.li","threadId":"27729","inReplyTo":"20110629164514.58175480.mihamina@bbs.mg","subject":"Re: importing history","fromName":"Christof Krüger","fromEmail":"git@christof-krueger.de","sentAt":"2011-06-29T14:25:50Z","receivedAt":"2011-06-29T14:25:50Z","isPatch":false,"sender":{"key":"git@christof-krueger.de","avatar":null},"body":"Hi,\n\n> Then I created an account in a forge (like github or so...), where I\n> had to clone an empty GIT repository in order to begin to work.\n> I dont have admin access to the forge, so no \"scp\" to the repo\n> hosting possible.\nWhy did you have to clone an empty repository? It should be enough to add\nthe correct remote config directly in your \"from-svn\" repository and just\npush it.\n\n> Now, I have 2 \"local\" repos:\n> - the one from the SVN\n> - the empty one from the forge\n\nNow that you already have cloned the empty repository you can just look at\nthe remote configuration in it:\n\n git config --list|grep remote\n\nYou should see something like the following:\n\nremote.origin.url=user@example.com/path/to/repository.git\nremote.origin.fetch=+refs/heads/*:refs/remotes/origin/*\n\nGo to your from-svn repository and add the above configuration, then \"git\npush origin master\".\n\nGood luck!\n\nRegards,\n  Chris\n"},{"id":"170670","messageId":"m2sjqswp85.fsf@igel.home","threadId":"27729","inReplyTo":"348bd65ad7c7690bcce553fe3c8e0bfb.squirrel@mail.localhost.li","subject":"Re: importing history","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-06-29T16:56:42Z","receivedAt":"2011-06-29T16:56:42Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Christof Krüger <git@christof-krueger.de> writes:\n\n> Now that you already have cloned the empty repository you can just look at\n> the remote configuration in it:\n>\n>  git config --list|grep remote\n>\n> You should see something like the following:\n>\n> remote.origin.url=user@example.com/path/to/repository.git\n> remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*\n>\n> Go to your from-svn repository and add the above configuration, then \"git\n> push origin master\".\n\nCareful.  git svn uses the remotes namespace in a non-std way.  Better\nto locally clone the from-svn repository into a new one, then use \"git\nremote add origin user@example.com/path/to/repository.git\" to add the\nremote repository.  Then you can safely push the master branch.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"170672","messageId":"1309366960.2417.55.camel@oxylap","threadId":"27729","inReplyTo":"m2sjqswp85.fsf@igel.home","subject":"Re: importing history","fromName":"Christof Krüger","fromEmail":"git@christof-krueger.de","sentAt":"2011-06-29T17:02:40Z","receivedAt":"2011-06-29T17:02:40Z","isPatch":false,"sender":{"key":"git@christof-krueger.de","avatar":null},"body":"On Mi, 2011-06-29 at 18:56 +0200, Andreas Schwab wrote:\n> Careful.  git svn uses the remotes namespace in a non-std way.  Better\n> to locally clone the from-svn repository into a new one, then use \"git\n> remote add origin user@example.com/path/to/repository.git\" to add the\n> remote repository.  Then you can safely push the master branch.\nDoesn't git svn use svn-remove.svn.* and not remote.*?\nI've been doing that before and it worked for me.\n\n\"git svn dcommit\" and \"git push\" are orthogonal to my understanding. If\nyou have an example, where git svn doesn't play well with \"usual\" git\nremotes, I'd be happy to see them.\n\nRegards,\n  Chris \n"},{"id":"170683","messageId":"m262nofhid.fsf@igel.home","threadId":"27729","inReplyTo":"1309366960.2417.55.camel@oxylap","subject":"Re: importing history","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-06-29T21:35:22Z","receivedAt":"2011-06-29T21:35:22Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Christof Krüger <git@christof-krueger.de> writes:\n\n> On Mi, 2011-06-29 at 18:56 +0200, Andreas Schwab wrote:\n>> Careful.  git svn uses the remotes namespace in a non-std way.  Better\n>> to locally clone the from-svn repository into a new one, then use \"git\n>> remote add origin user@example.com/path/to/repository.git\" to add the\n>> remote repository.  Then you can safely push the master branch.\n> Doesn't git svn use svn-remove.svn.* and not remote.*?\n\nI'm not talking about the config options, but of the ref namespace.  If\nyour svn repository would have a branch named origin it would be stored\nas refs/remotes/origin by git svn, which would conflict with \"git remote\nadd origin ...\"\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"170696","messageId":"1309410043.2417.70.camel@oxylap","threadId":"27729","inReplyTo":"m262nofhid.fsf@igel.home","subject":"Re: importing history","fromName":"Christof Krüger","fromEmail":"git@christof-krueger.de","sentAt":"2011-06-30T05:00:43Z","receivedAt":"2011-06-30T05:00:43Z","isPatch":false,"sender":{"key":"git@christof-krueger.de","avatar":null},"body":"On Mi, 2011-06-29 at 23:35 +0200, Andreas Schwab wrote:\n> I'm not talking about the config options, but of the ref namespace.  If\n> your svn repository would have a branch named origin it would be stored\n> as refs/remotes/origin by git svn, which would conflict with \"git remote\n> add origin ...\"\nAh, thanks for explaining.\nAs of now, I only had to do with rather \"dump\" SVN repositories with\nonly a trunk (or only non-stdlayout branches I didn't care about\nanyways).\n\nBut do you think things could be seriously screwed up because of this?\nOr would just one of the commands gracefully fail, leaving the\nunexperienced user with an error message he doesn't understand?\n\nChris.\n"}]}