Skip to content

Instantly share code, notes, and snippets.

@skarra
Created August 12, 2013 09:09
Show Gist options
  • Save skarra/6209354 to your computer and use it in GitHub Desktop.
Save skarra/6209354 to your computer and use it in GitHub Desktop.
Purge all occurrences of a file from a git repo. Comes in handy when you commit some sensitive stuff to a git repo. More details ehre: https://help.github.com/articles/remove-sensitive-data
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch test/gold/data/bb/99-bbdb.v6.utah.non-utf8' --prune-empty --tag-name-filter cat -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment