Remove a specific changeset from Git repository altogether?

Is it even possible to remove a particular changeset from a Git repository altogether. I want to do this because there was a commit while ago that added some binary files that are absolutely useless for source code management.

I can understand if this is impossible to do given the fact that the commit nodes have parents and a specific history, but I guess it will not hurt to ask.

  • Atlassian SourceTree custom action contrast
  • Stash/branch/working copy confusion
  • Start with git or svn?
  • Git stash uncached: how to put away all unstaged changes?
  • Git “Fetch URL” and “Push URL”, whats the difference?
  • Commit empty folder structure (with git)
  • And the answer is no for questions that ask “can you just clone new copy of the time before that commit occurred and start from there again?”.

  • svn to git migration: incomplete history
  • Is it possible to determine if two git branches will merge cleanly without affecting the working directory?
  • Gerrit recreating change-ids
  • Django error on makemessages “should be run from the Django Git tree or your project or app tree”
  • Best way to add sub module ignored content
  • Is it possible to use komodo edit as git core.editor (i.e. without forking)?
  • One Solution collect form web for “Remove a specific changeset from Git repository altogether?”

    Use git rebase -i <commit-id>, there id is a commit before the changeset you want to remove. It will open a list of commits between the head and the changeset, delete from the list the commit you want and continue. When this commit will be “detached”, it means it will be floating in the repository until it’s garbage collected. You could use git gc to force it.

    However, you should remember, that all clones of the repository will be diverged, and should be rebased too after it.

    Git Baby is a git and github fan, let's start git clone.