git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Michael J Gruber
Message 5 of 5 in “git-svn mirror in bare repo”
  1. Enrico WeigeltAug 23, 2010
  2. Michael J GruberAug 23, 2010
  3. Enrico WeigeltAug 23, 2010
  4. Michael J GruberAug 23, 2010
  5. Wesley J. LandakerAug 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.