Skip to content

Instantly share code, notes, and snippets.

@ritchie46
Created March 23, 2020 10:34
Show Gist options
  • Save ritchie46/e81ff8816af3dd06a1515cf23f79b805 to your computer and use it in GitHub Desktop.
Save ritchie46/e81ff8816af3dd06a1515cf23f79b805 to your computer and use it in GitHub Desktop.
Remove file from git history w/ git filter-branch
git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA" \
--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