{"thread":{"id":"13956","subject":"[PATCH] Add SVN->Git conversion example to documentation","startedAt":"2008-06-14T18:09:29Z","lastAt":"2008-06-14T21:50:48Z","messageCount":3,"participants":["Heikki Orsila","Miklos Vajna"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"79866","messageId":"20080614180929.GA26449@zakalwe.fi","threadId":"13956","inReplyTo":null,"subject":"[PATCH] Add SVN->Git conversion example to documentation","fromName":"Heikki Orsila","fromEmail":"heikki.orsila@iki.fi","sentAt":"2008-06-14T18:09:29Z","receivedAt":"2008-06-14T18:09:29Z","isPatch":true,"sender":{"key":"heikki.orsila@iki.fi","avatar":null},"body":"Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>\n---\nThis is a correction to the earlier patch that had a typo.\n\n Documentation/git-svn.txt |   29 ++++++++++++++++++++++++++---\n 1 files changed, 26 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt\nindex f4cbd2f..dcf1e25 100644\n--- a/Documentation/git-svn.txt\n+++ b/Documentation/git-svn.txt\n@@ -11,9 +11,12 @@ SYNOPSIS\n \n DESCRIPTION\n -----------\n-git-svn is a simple conduit for changesets between Subversion and git.\n-It is not to be confused with linkgit:git-svnimport[1], which is\n-read-only.\n+git-svn is a simple bidirectional conduit for changesets between\n+Subversion and git. It is used to develop projects with Git tools,\n+but commit changes to a Subversion repository. It can also be used to\n+convert a Subversion repository to a Git repository. It should not\n+be confused with linkgit:git-svnimport[1], which does Subversion to\n+Git conversion, but not the other direction.\n \n git-svn was originally designed for an individual developer who wants a\n bidirectional flow of changesets between a single branch in Subversion\n@@ -520,6 +523,26 @@ have each person clone that repository with 'git clone':\n \tgit-svn rebase\n ------------------------------------------------------------------------\n \n+CONVERTING A SUBVERSION REPOSITORY TO A GIT REPOSITORY\n+------------------------------------------------------\n+\n+When converting a Subversion repository to a Git repository\n+--no-metadata removes \"git-svn-id:\" comments from the log.\n+-A option is used to convert SVN pseudonyms to real names\n+and email addresses. The whole repository, or a part of it can be\n+converted. Two examples below show how to convert the whole repo\n+with all branches, or only the SVN trunk.\n+\n+------------------------------------------------------------------------\n+# Convert all branches of an SVN repository to a Git repository:\n+\n+\tgit svn clone --no-metadata -A authors.txt SVN_URL foo.git\n+\n+# Convert only the trunk of an SVN repository to a Git repository:\n+\n+\tgit svn clone --no-metadata -A authors.txt SVN_URL/trunk foo.git\n+------------------------------------------------------------------------\n+\n REBASE VS. PULL/MERGE\n ---------------------\n \n-- \n1.5.5.1.1.ga5e5c\n"},{"id":"79878","messageId":"20080614190648.GF29404@genesis.frugalware.org","threadId":"13956","inReplyTo":"20080614180929.GA26449@zakalwe.fi","subject":"Re: [PATCH] Add SVN->Git conversion example to documentation","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-06-14T19:06:48Z","receivedAt":"2008-06-14T19:06:48Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Sat, Jun 14, 2008 at 09:09:29PM +0300, Heikki Orsila <heikki.orsila@iki.fi> wrote:\n> +------------------------------------------------------------------------\n> +# Convert all branches of an SVN repository to a Git repository:\n> +\n> +\tgit svn clone --no-metadata -A authors.txt SVN_URL foo.git\n\nDon't you need -s here?\n\nTwo other minor notes:\n\n1) I would add an example on how to update such a repo in case it will\nbe a mirror, like 'git --bare svn fetch'.\n\n2) I would mention that one still needs a trick if he/she wants to allow\nothers to clone this repo, with something like:\n\ngit config remote.origin.url .\ngit config remote.origin.fetch +refs/remotes/tags/*:refs/tags/*\ngit config --add remote.origin.fetch +refs/remotes/*:refs/heads/*\ngit fetch\n"},{"id":"79885","messageId":"20080614215048.GO10527@jolt.modeemi.cs.tut.fi","threadId":"13956","inReplyTo":"20080614190648.GF29404@genesis.frugalware.org","subject":"Re: [PATCH] Add SVN->Git conversion example to documentation","fromName":"Heikki Orsila","fromEmail":"shd@modeemi.fi","sentAt":"2008-06-14T21:50:48Z","receivedAt":"2008-06-14T21:50:48Z","isPatch":true,"sender":{"key":"shd@modeemi.fi","avatar":null},"body":"On Sat, Jun 14, 2008 at 09:06:48PM +0200, Miklos Vajna wrote:\n> On Sat, Jun 14, 2008 at 09:09:29PM +0300, Heikki Orsila <heikki.orsila@iki.fi> wrote:\n> > +------------------------------------------------------------------------\n> > +# Convert all branches of an SVN repository to a Git repository:\n> > +\n> > +\tgit svn clone --no-metadata -A authors.txt SVN_URL foo.git\n> \n> Don't you need -s here?\n\nIt seems not.\n\n> 2) I would mention that one still needs a trick if he/she wants to allow\n> others to clone this repo, with something like:\n> \n> git config remote.origin.url .\n> git config remote.origin.fetch +refs/remotes/tags/*:refs/tags/*\n> git config --add remote.origin.fetch +refs/remotes/*:refs/heads/*\n> git fetch\n\nWill add.\n\n-- \nHeikki Orsila\nheikki.orsila@iki.fi\nhttp://www.iki.fi/shd\n"}]}