From: Wincent Colaiuta <win@wincent.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Obliterating a commit
Date: Sun, 30 Sep 2007 13:32:36 +0200 [thread overview]
Message-ID: <D2BD14BD-44F2-4D01-AAEE-6CBC2A2DE85B@wincent.com> (raw)
A couple of days ago I mistakenly checked in a file that had some
confidential information in it. I immediately realized and amended my
commit, and this is a local repository whose contents won't be
visible until I push them out.
So how do I *really* get rid of the that commit before publishing? I
couldn't find any porcelain or plumbing to do this. Do I have to
manually destroy it? ie. wind back the HEAD, manually remove the
commit object, the corresponding tree object, the corresponding file
blobs, and probably manually remove the entry from the reflog as well?
Is there a "shortcut" wherein I can somehow mark this commit and its
related tree and file blobs as unreachable, and then use git-prune to
erradicate them?
Cheers,
Wincent
next reply other threads:[~2007-09-30 11:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-30 11:32 Wincent Colaiuta [this message]
2007-09-30 12:15 ` Obliterating a commit Matthias Kestenholz
2007-09-30 14:13 ` Wincent Colaiuta
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=D2BD14BD-44F2-4D01-AAEE-6CBC2A2DE85B@wincent.com \
--to=win@wincent.com \
--cc=git@vger.kernel.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