In the typical case, this option produces a cleaner history. index-filter 'git rm -cached -f -ignore-unmatch oops.iso' \ Using the technique described in the aforementioned blog post, the command to execute is: git filter-branch -prune-empty -d /dev/shm/scratch \ In the “Careless” commit (whose SHA1 object name is ce36c98) the file oops.iso is the DVD-rip added by accident and removed in the next commit, cb14efd. With the -name-status switch, we can see tree modifications associated with each commit.
Note that git lola is a non-standard but highly useful alias. Say your git history is: $ git lola -name-status I had a similar problem with bulky binary test data from a Subversion import and wrote about removing data from a git repository.
You have at least two options: git filter-branch and an interactive rebase, both explained below. See “Recovering From Upstream Rebase” in the git rebase documentation for the necessary steps after repairing your history. What you want to do is highly disruptive if you have published history to other developers.