Re: git-svn mirror in bare repo
- From
Wesley J. Landaker <wjl@icecavern.net>
- Date
- Aug 28, 2010, 16:45 UTC
- Message-ID
- <4C793D1A.8050200@icecavern.net>
- In-Reply-To
- <20100823122425.GB12810@nibiru.local>
On 08/23/2010 05:24 AM, Enrico Weigelt wrote:
Show 6 quoted lines
> 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.