Skip to content

Instantly share code, notes, and snippets.

@Hugoch
Created February 24, 2016 08:44
Show Gist options
  • Save Hugoch/6a9c7072458e92673763 to your computer and use it in GitHub Desktop.
Save Hugoch/6a9c7072458e92673763 to your computer and use it in GitHub Desktop.
Completely remove a file from git history
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch YOUR_FILE' --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