git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Klas Lindberg" <klas.lindberg@gmail.com>
Cc: "Michael J Gruber" <git@drmicha.warpmail.net>,
	"Steven Grimm" <koreth@midwinter.com>,
	"Git Users List" <git@vger.kernel.org>
Subject: Re: How to remove a commit object?
Date: Thu, 02 Oct 2008 07:02:32 -0700 (PDT)	[thread overview]
Message-ID: <m3ljx7qemk.fsf@localhost.localdomain> (raw)
In-Reply-To: <33f4f4d70810020636g77f4180cm7aa6b7de07ae5beb@mail.gmail.com>

"Klas Lindberg" <klas.lindberg@gmail.com> 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

  parent reply	other threads:[~2008-10-02 14:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 23:41 How to remove a commit object? Steven Grimm
2008-09-19  9:16 ` Michael J Gruber
2008-10-02 13:36   ` Klas Lindberg
2008-10-02 14:00     ` Michael J Gruber
2008-10-02 14:02     ` Jakub Narebski [this message]
2008-10-02 14:26       ` Klas Lindberg
2008-10-02 14:30         ` Michael J Gruber
2008-10-02 14:52           ` Klas Lindberg
2008-10-02 15:02         ` Johannes Sixt
2008-10-03 11:42           ` Klas Lindberg
2008-10-03 12:03             ` Johannes Sixt

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=m3ljx7qemk.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=klas.lindberg@gmail.com \
    --cc=koreth@midwinter.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).