From: Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
To: git@vger.kernel.org
Subject: Re: Converting from svn to git
Date: Sun, 10 Aug 2008 17:32:34 +0200 [thread overview]
Message-ID: <g7n1mk$67t$1@ger.gmane.org> (raw)
In-Reply-To: <e0b44a890808100754l536bc4f3kfd953b52044f6e59@mail.gmail.com>
David Neu venit, vidit, dixit 10.08.2008 16:54:
> 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
It complains because filter-branch stores the original refs in that
namespace, and on the second filter-branch run it wants to do this
again. You can avoid this by using the "-f" option to filter-branch, or
by removing all subsirs in one go ("rm -rf subdir1 subdir2..."). Also,
you might want to rewrite all refs ("--all"), not just HEAD.
Michael
next prev parent reply other threads:[~2008-08-10 15:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-10 13:11 Converting from svn to git David Neu
2008-08-10 13:24 ` Miklos Vajna
2008-08-10 14:54 ` David Neu
2008-08-10 15:32 ` Michael J Gruber [this message]
2008-08-10 15:48 ` David Neu
2008-08-11 17:46 ` David Neu
2008-08-15 13:58 ` Michael J Gruber
2008-08-17 9:11 ` Sam Vilain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='g7n1mk$67t$1@ger.gmane.org' \
--to=michaeljgruber+gmane@fastmail.fm \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.