Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • If nobody has this particular object, is there some way to remove it from git? Commented Feb 23, 2011 at 14:53
  • 2
    @Albert: The ID of commit (or anything else) is a cryptographically strong hash of the whole history leading to it, so you can't remove anything from it. You can, however, use git filter-branch to create an alternate history without whatever you need to exclude. Everybody needs to switch to the new history afterwards. Commented Mar 7, 2011 at 13:49
  • 1
    Comment update: there is now git filter-repo, which is a faster and slightly easier to use replacement for the standard git filter-branch. Commented Dec 7, 2022 at 12:02