Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DoktorMike/67618a59e9ebdf34eada475f9f46a44b to your computer and use it in GitHub Desktop.
Save DoktorMike/67618a59e9ebdf34eada475f9f46a44b to your computer and use it in GitHub Desktop.
Git commit fuckup undo :)
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