# [PATCH] Add SVN->Git conversion example to documentation

2 messages from 2008-06-14 to 2008-06-15. Participants: Heikki Orsila, Karl Hasselström.
Thread: https://gitlist.dev/t/13955

## Heikki Orsila, 2008-06-14 18:03

Subject: [PATCH] Add SVN->Git conversion example to documentation
Message-ID: <20080614180334.GA26359@zakalwe.fi>
URL: https://gitlist.dev/e/20080614180334.GA26359%40zakalwe.fi

```
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
---
 Documentation/git-svn.txt |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index f4cbd2f..128761e 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -11,9 +11,12 @@ SYNOPSIS
 
 DESCRIPTION
 -----------
-git-svn is a simple conduit for changesets between Subversion and git.
-It is not to be confused with linkgit:git-svnimport[1], which is
-read-only.
+git-svn is a simple bidirectional conduit for changesets between
+Subversion and git. It is used to develop projects with Git tools,
+but commit changes to a Subversion repository. It can also be used to
+convert a Subversion repository to a Git repository. It should not to
+be confused with linkgit:git-svnimport[1], which does Subversion to
+Git conversion, but not the other direction.
 
 git-svn was originally designed for an individual developer who wants a
 bidirectional flow of changesets between a single branch in Subversion
@@ -520,6 +523,26 @@ have each person clone that repository with 'git clone':
 	git-svn rebase
 ------------------------------------------------------------------------
 
+CONVERTING A SUBVERSION REPOSITORY TO A GIT REPOSITORY
+------------------------------------------------------
+
+When converting a Subversion repository to a Git repository
+--no-metadata removes "git-svn-id:" comments from the log.
+-A option is used to convert SVN pseudonyms to real names
+and email addresses. The whole repository, or a part of it can be
+converted. Two examples below show how to convert the whole repo
+with all branches, or only the SVN trunk.
+
+------------------------------------------------------------------------
+# Convert all branches of an SVN repository to a Git repository:
+
+	git svn clone --no-metadata -A authors.txt SVN_URL foo.git
+
+# Convert only the trunk of an SVN repository to a Git repository:
+
+	git svn clone --no-metadata -A authors.txt SVN_URL/trunk foo.git
+------------------------------------------------------------------------
+
 REBASE VS. PULL/MERGE
 ---------------------
 
-- 
1.5.5.1.1.ga5e5c

```

## Karl Hasselström, 2008-06-15 13:17

Subject: Re: [PATCH] Add SVN->Git conversion example to documentation
Message-ID: <20080615131742.GA316@diana.vm.bytemark.co.uk>
URL: https://gitlist.dev/e/20080615131742.GA316%40diana.vm.bytemark.co.uk
In-Reply-To: <20080614180334.GA26359@zakalwe.fi>

```
On 2008-06-14 21:03:34 +0300, Heikki Orsila wrote:

>  DESCRIPTION
>  -----------
> -git-svn is a simple conduit for changesets between Subversion and git.
> -It is not to be confused with linkgit:git-svnimport[1], which is
> -read-only.
> +git-svn is a simple bidirectional conduit for changesets between
> +Subversion and git. It is used to develop projects with Git tools,
> +but commit changes to a Subversion repository. It can also be used to
> +convert a Subversion repository to a Git repository. It should not to
> +be confused with linkgit:git-svnimport[1], which does Subversion to
> +Git conversion, but not the other direction.

I don't know if it's such a good idea to mention git-svnimport at all;
but if you do, please also mention that it's no longer supported. (But
really, since it is no longer supported, I doubt mentioning it is a
good idea.)

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

```
