Re: Rewriting history with git-filter-branch and leaking objects (?)
- From
Mike Hommey <mh@glandium.org>
- Date
- Aug 17, 2007, 17:46 UTC
- Message-ID
- <20070817174621.GA14503@glandium.org>
- In-Reply-To
- <86k5ruxdxz.fsf@lola.quinscape.zz>
On Fri, Aug 17, 2007 at 07:34:32PM +0200, David Kastrup <dak@gnu.org> wrote:
Show 26 quoted lines
> Mike Hommey <mh@glandium.org> writes: > > > I've been playing with git-filter-branch, and was wondering how objects > > from the original branch are supposed to be removed. > > > > It looks like removing the refs/original/* refs is not enough. > > > > And it also looks like when all references seem to be removed, git-prune > > doesn't fully do its job... > > It is quite quite hard to get rid of objects. You need to get the > reflogs for the commits and the files expired. > > The last time I tried this, I ended up unpacking the packed objects, > calling git-fsck with appropriate options to tell me about > unreferenced objects when ignoring reflogs, and removing the files > manually with xargs and rm. > > Probably I was not able to do something reasonably intelligent, but > making git actually _lose_ data/commits/whatever is really, really > hard. I have messed up my repo structure considerably several times, > and everything is still there, with the reflog telling you how to get > it. > > Given how easy it is to shoot oneself in the foot with git, it is not > the worst thing. But you really have to work if you _mean_ it.
Well, with the introduction of git-filter-branch, once you have rewritten your history and validated that everything is okay, you might mean to remove the original branch...
Mike