Skip to content

Instantly share code, notes, and snippets.

@a2
Created September 5, 2011 23:10
Show Gist options
  • Save a2/1196132 to your computer and use it in GitHub Desktop.
Save a2/1196132 to your computer and use it in GitHub Desktop.
Deletes file/folder from all revisions (as if it never existed).
git filter-branch --index-filter 'git rm --cached --ignore-unmatch FILE' HEAD
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch FLDR' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment