Re: [PATCH] Add SVN->Git conversion example to documentation
- From
Miklos Vajna <vmiklos@frugalware.org>
- Date
- Jun 14, 2008, 22:47 UTC
- Message-ID
- <20080614224758.GL29404@genesis.frugalware.org>
- In-Reply-To
- <20080614215812.GA28574@zakalwe.fi>
On Sun, Jun 15, 2008 at 12:58:12AM +0300, Heikki Orsila <heikki.orsila@iki.fi> wrote:
> +After that, the new repository should be cleaned, and fetch heads should > +be set. > +------------------------------------------------------------------------ > + cd foo.git/.git
Heh, I was confused. foo.git is usually a bare repo, if the repo has a working directory as well, then just call it foo.
And then: if you convert an svn repo to a git one, don't you want to convert it to a bare repo?
I haven't tried git-svn clone but the following will work for sure:
git --bare init git --bare svn init -s URL git --bare svn fetch
Show 7 quoted lines
> + rm -rf svn > + git config --remove-section svn-remote.svn > + git config remote.origin.url . > + git config remote.origin.fetch +refs/remotes/tags/*:refs/tags/* > + git config --add remote.origin.fetch +refs/remotes/*:refs/heads/* > + git fetch > + git gc
If you remove the svn dir, why don't you remove refs/remotes as well? (Probably via update-ref since git svn will pack refs before it ends for big repos, I think.)
Also I think it would be a good idea to give a hint how to do incremental updates. Something like not deleting the svn dir and using git --bare svn fetch; git fetch.
PS: I'm not a git-svn contributor or anything, just thought I give you some advices, I hope it helped. :-)