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

Re: Converting from svn to git

From
DNDavid Neu <david@davidneu.com>
Date
Aug 10, 2008, 14:54 UTC
Message-ID
<e0b44a890808100754l536bc4f3kfd953b52044f6e59@mail.gmail.com>
In-Reply-To
<20080810132409.GE18960@genesis.frugalware.org>

Thanks for the reply - this looks like what I'd need, but I can't see how to keep the contents of the base dir and lose the subdirs, e.g.

$ git-filter-branch --subdirectory-filter . HEAD
removes all subdirs and the contents of the base dir.
So, I figure I'd remove each subdir, using
$ git-filter-branch --tree-filter 'rm -rf subdir1/' HEAD

but this complains if subdir1 contains subdirectories, it says: Namespace refs/original/ not empty

Many thanks!

Cheers, David

On Sun, Aug 10, 2008 at 9:24 AM, Miklos Vajna <vmiklos@frugalware.org> wrote:
Show 13 quoted lines
>
> On Sun, Aug 10, 2008 at 09:11:43AM -0400, David Neu <david@davidneu.com> wrote:
> > Is there a git-svn strategy similar to git-svnimport -P that would do the trick?
> > My git version 1.5.6.4 doesn't include git-svnimport, and I'm getting
> > the impression
> > it's be deprecated.
>
> Sure, it is. Though if you _really_ need it, it's still under
> /contrib/examples.
>
> Anyway, if you do a single conversion, then probably speed does not
> matter a lot; I would do a full import then use the subdirectory-filter
> of git filter-branch do drop everything outside the subdirectory.
Previous: Miklos VajnaNext: Michael J Gruber
Message 3 of 8 in “Converting from svn to git”
  1. David NeuAug 10, 2008
  2. Miklos VajnaAug 10, 2008
  3. David NeuAug 10, 2008
  4. Michael J GruberAug 10, 2008
  5. David NeuAug 10, 2008
  6. David NeuAug 11, 2008
  7. Michael J GruberAug 15, 2008
  8. Sam VilainAug 17, 2008

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.