Skip to content

Instantly share code, notes, and snippets.

@st3v
Created February 1, 2013 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save st3v/4689937 to your computer and use it in GitHub Desktop.
Save st3v/4689937 to your computer and use it in GitHub Desktop.
Remove file from every commit in the git history
git filter-branch --index-filter 'git rm --cached --ignore-unmatch foobar.txt' -f --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