Skip to content

Instantly share code, notes, and snippets.

@davidmerrick
Created September 27, 2018 22:31
Show Gist options
  • Save davidmerrick/ddbd19f2d4cbe19848081f035cc17b1e to your computer and use it in GitHub Desktop.
Save davidmerrick/ddbd19f2d4cbe19848081f035cc17b1e to your computer and use it in GitHub Desktop.
Purge a file from git's history
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch myFile' \
--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