From: "Shawn O. Pearce" <spearce@spearce.org>
To: Michael Hendricks <michael@ndrix.org>
Cc: git@vger.kernel.org
Subject: Re: removing content from git history
Date: Wed, 21 Feb 2007 11:56:36 -0500 [thread overview]
Message-ID: <20070221165636.GH25559@spearce.org> (raw)
In-Reply-To: <20070221164527.GA8513@ginosko.local>
Michael Hendricks <michael@ndrix.org> wrote:
> Is it possible to remove content entirely from git's history?
No, not once it has been published around to another repository.
Since every developer has a copy of the repository its very difficult
to remove something, as it must be removed from every developer's
repository, and each developer must perform an action to agree to
that removal. So just one hold-out will keep the bad content around.
> I have a
> client who does not use git for version control. A couple months ago
> they committed some sensitive client information which should never have
> been committed. Recently, they realized the mistake and now want to
> remove all traces of the mistake from history.
>
> I would like to migrate them to git at some point. However, if they had
> been using git for version control already, I'm not sure how I would
> solved this particular problem. Any suggestions?
The *only* way to do this in Git is to completely recreate every
commit after that point. This changes all commit IDs and basically
forks the project into two completely different histories: the
one with the bad thing in it, and the one without the bad thing.
Users who have the bad thing will continue to have the bad thing
until they take explicit action to throw away all of that history
and switch to the other one.
Now this is actually not a huge deal if you do it on your local
repository and go "whoops, I should not have committed that". If you
have not yet pushed the commit to another repository (and someone
has not yet fetched it from you either) you can use git-rebase to
discard it. But once its been pushed/fetched the genie is out of
the bottle, and its not going back in.
--
Shawn.
next prev parent reply other threads:[~2007-02-21 16:56 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 [this message]
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
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=20070221165636.GH25559@spearce.org \
--to=spearce@spearce.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 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).