Skip to content

Instantly share code, notes, and snippets.

@derak
Created December 12, 2013 22:27
Show Gist options
  • Select an option

  • Save derak/7936673 to your computer and use it in GitHub Desktop.

Select an option

Save derak/7936673 to your computer and use it in GitHub Desktop.
Remove all commits of a file from a repo
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch some_file.py' --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