Created
June 30, 2012 01:17
-
-
Save JamesMcMahon/3021669 to your computer and use it in GitHub Desktop.
Shell script from https://help.github.com/articles/remove-sensitive-data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git filter-branch --index-filter 'git rm --cached --ignore-unmatch '$1'' --prune-empty --tag-name-filter cat -- --all | |
rm -rf .git/refs/original/ | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
git gc --aggressive --prune=now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment