Obliterating a commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux