# Git-to-svn convert

5 messages from 2007-12-19 to 2007-12-20. Participants: Thomas Harning, Miklos Vajna, Martin Langhoff, Andrew McMillan.
Thread: https://gitlist.dev/t/11361

## Thomas Harning, 2007-12-19 22:14

Subject: Git-to-svn convert
Message-ID: <476997C1.2080506@gmail.com>
URL: https://gitlist.dev/e/476997C1.2080506%40gmail.com

```
Is there a reasonable way to convert a Git project to Subversion...
Yeah, I know, blasphemy :-P... but I worked on a project in Git and my 
boss wants me to put it into Subversion.

git-svn looks to be the tool for this.. however I had some non-linear 
dev, which doesn't look like it'd commit (In the past I think I tried 
this and it failed to deal w/ a branch-and-merge...).

Example of what I mean...:

a - b -
 `c'


As to how to pull the repository into subversion.. how would I do that?
git-svn init ?

```

## Miklos Vajna, 2007-12-19 23:16

Subject: Re: Git-to-svn convert
Message-ID: <20071219231643.GB7378@genesis.frugalware.org>
URL: https://gitlist.dev/e/20071219231643.GB7378%40genesis.frugalware.org
In-Reply-To: <476997C1.2080506@gmail.com>

```
On Wed, Dec 19, 2007 at 05:14:25PM -0500, Thomas Harning <harningt@gmail.com> wrote:
> Example of what I mean...:
> 
> a - b -
> `c'
> 
> 
> As to how to pull the repository into subversion.. how would I do that?
> git-svn init ?

i think you have two options:

- use some 3rd-party tool like tailor

- first you should rewrite your history by creating a linear history
  then git-svn can dcommit your changes to svn

- VMiklos

```

## Martin Langhoff, 2007-12-19 23:54

Subject: Re: Git-to-svn convert
Message-ID: <46a038f90712191554t2c1adc79s7948c7002c145143@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90712191554t2c1adc79s7948c7002c145143%40mail.gmail.com
In-Reply-To: <476997C1.2080506@gmail.com>

```
Hi Thomas,

I think Andrew McMillan had written a few scripts to "export" a git
repo to SVN and CVS. Not sure whether the code is public. But at least
for a while, the Mahara project was using git with SVN and CVS
"readonly" exported repos, a bit like the BK->CVS of yore. He may have
been using git-svn though.

cheers,


martin

```

## Andrew McMillan, 2007-12-20 05:32

Subject: Re: Git-to-svn convert
Message-ID: <1198128721.24580.78.camel@hippy.mcmillan.net.nz>
URL: https://gitlist.dev/e/1198128721.24580.78.camel%40hippy.mcmillan.net.nz
In-Reply-To: <46a038f90712191554t2c1adc79s7948c7002c145143@mail.gmail.com>

```
My code is an embarrasingly ugly, gruesome hack, but it (sort of)
works...

I use it to keep the SVN and CVS trees up to date on Sourceforge for
DAViCal ( http://rscds.sf.net/ ) from the Git tree.

Cheers,
					Andrew.

On Thu, 2007-12-20 at 12:54 +1300, Martin Langhoff wrote:
> Hi Thomas,
> 
> I think Andrew McMillan had written a few scripts to "export" a git
> repo to SVN and CVS. Not sure whether the code is public. But at least
> for a while, the Mahara project was using git with SVN and CVS
> "readonly" exported repos, a bit like the BK->CVS of yore. He may have
> been using git-svn though.
> 
> cheers,
> 
> 
> martin
> 
-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
                        Is this really happening?
-------------------------------------------------------------------------


```

## Thomas Harning, 2007-12-20 15:12

Subject: Re: Git-to-svn convert
Message-ID: <476A8645.7080007@gmail.com>
URL: https://gitlist.dev/e/476A8645.7080007%40gmail.com
In-Reply-To: <1198128721.24580.78.camel@hippy.mcmillan.net.nz>

```
Andrew McMillan wrote:
> My code is an embarrasingly ugly, gruesome hack, but it (sort of)
> works...
>
> I use it to keep the SVN and CVS trees up to date on Sourceforge for
> DAViCal ( http://rscds.sf.net/ ) from the Git tree.
>
> Cheers,
> 					Andrew
Where might I find the code?  I checked out git.catalyst.net.nz ... but 
I couldn't find anything that seemed to be a sync tool...  I figure I'd 
give it a try before manually rebasing or progressively cherry-picking a 
new tree...

```
