All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Michael Hendricks <michael@ndrix.org>
Cc: git@vger.kernel.org
Subject: Re: removing content from git history
Date: Wed, 21 Feb 2007 09:14:44 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702210904350.4043@woody.linux-foundation.org> (raw)
In-Reply-To: <20070221164527.GA8513@ginosko.local>



On Wed, 21 Feb 2007, Michael Hendricks wrote:
>
> I assume that this question has already been addressed on the mailing
> list, but I wasn't able to find anything about it in the archives.
> 
> Is it possible to remove content entirely from git's history?

It's been discussed.

There are two options for doing it:

 - rewriting history. There are a few tools for this already, and for 
   specific needs it would be fairly easy to resurrect git-convert-objects 
   to do it for any kind of object.

   See "cg-admin-rewritehist" from cogito for an example of a tool that 
   would do what you need done. In fact, it has this exact thing as the 
   first example.

   (Btw, I think cg-admin-rewritehist is one of the few things that cogito 
   had that was really a good idea. Not that people probably _used_ it 
   much, but it's somethign that makes sense in the plumbing)

 - explicit support for "missing objects". We don't do it right now, but 
   we could add it. It was discussed for things like limited history etc 
   (the "shallow clone" kind of thing, before people actually added 
   shallow clones), and it would support the notion of "we export all our 
   history, but for internal reasons we cannot make certain objects 
   available" kinds of workflows.

So right now, rewriting history is an option that you can do. It will 
effectively create a totally new branch (which you can then make into a 
new repository) which has nothing in common with the old branch from the 
point where it was modified. So you can never really merge the two ever 
again, and you need to make sure that everybody who had the old repo 
contents will destroy it.

But at least in theory, it wouldn't be impossible to extend on the 
".git/grafts" kind of setup to say "this object has been consciously 
deleted", and that could in some circumstances be a better model. The 
biggest headache there would be the need to extend the native git protocol 
with a way to add such objects.

			Linus

  parent reply	other threads:[~2007-02-21 17:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21 16:45 removing content from git history Michael Hendricks
2007-02-21 16:56 ` Shawn O. Pearce
2007-02-21 17:17   ` J. Bruce Fields
2007-02-21 18:02     ` Linus Torvalds
2007-02-21 18:24       ` Linus Torvalds
2007-02-21 21:00       ` Shawn O. Pearce
2007-02-21 21:11         ` Linus Torvalds
2007-02-21 21:21           ` Shawn O. Pearce
2007-10-09 20:58             ` Bill Lear
2007-10-09 21:02               ` J. Bruce Fields
2007-10-09 22:25                 ` Bill Lear
2007-10-10 14:41               ` Johannes Schindelin
2007-02-21 17:14 ` Linus Torvalds [this message]
2007-02-21 18:02   ` Nicolas Pitre
2007-02-21 18:13     ` Linus Torvalds
2007-02-21 18:39       ` Nicolas Pitre
2007-02-21 18:30   ` Michael Hendricks
2007-02-21 18:37     ` Shawn O. Pearce
2007-02-21 18:47     ` Linus Torvalds
2007-02-21 18:56       ` Linus Torvalds
2007-02-21 18:52     ` Nicolas Pitre
2007-02-21 19:01   ` Junio C Hamano
2007-02-21 19:33     ` Nicolas Pitre
2007-02-21 20:22       ` Junio C Hamano
2007-02-21 20:49         ` Nicolas Pitre

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=Pine.LNX.4.64.0702210904350.4043@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=michael@ndrix.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.