Subject: Re: How to remove a commit object?

From: Jakub Narebski <[email-masked]>
Date: Thu, 02 Oct 2008 07:02:32 -0700 (PDT)

"Klas Lindberg" <[email-masked]> writes:

> This doesn't seem to work for me. I will soon be in a situation where
> I need to selectively delete commits in such a way that they become
> completely irrecoverable. I.e. it is not enough to revert a commit.
> The *original* commit must be removed. And of course, the repo history
> is too complex to allow for rebasing followed by garbage collection or
> something like that.
[...]

> Would it be feasible to write a tool that can selectively replace a
> specific commit in the commit DAG, or would that automatically
> invalidate every SHA key for every commit that follows the replaced
> original?

It would invalidate SHA1 for every commit after first rewritten.
There are two tools which you can use to rewrite large parts of
history automatically: git-filter-branch, and git-fast-export +
git-fast-import.

HTH
-- 
Jakub Narebski
Poland
ShadeHawk on #git