Subject: Re: git-svn mirror in bare repo

From: "Wesley J. Landaker" <[email-masked]>
Date: Sat, 28 Aug 2010 09:45:14 -0700

On 08/23/2010 05:24 AM, Enrico Weigelt wrote:
> is it possible to use git-svn w/ an bare repository (eg. using
> an temporary workdir when necessary or directly creating tree
> and commit objects w/o going through workdir at all) ?
> 
> I'm running a dozen of mirrors (also from cvs), some from fairly
> large and I'd like to get rid of the working copies.

When I have a large repository with git-svn that I only occasionally
want to use the working copy of it, here is what I do:

1) git svn clone the SVN repository normally
2) Create an "empty" branch with no files ("git checkout --orphan")

When I want to update SVN, I do:

  git checkout trunk
  git svn rebase
  git checkout empty

When I want to push something to SVN I do:

  git checkout trunk
  git svn dcommit
  git checkout empty

This makes it work sort of like a bare repository, but it still works
with git-svn. I use this when I have a bunch of SVN repositories I need
to be able to work with quickly at any time, but I don't want to waste
the disk space having all of their working copies checked out
simultaneously.