Skip to content

Instantly share code, notes, and snippets.

@scien
Created September 10, 2014 05:22
Show Gist options
  • Save scien/54694d0e0180b9ac9b91 to your computer and use it in GitHub Desktop.
Save scien/54694d0e0180b9ac9b91 to your computer and use it in GitHub Desktop.
prune a file from git history
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch target_file.ext’ --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