Created
January 17, 2013 15:43
-
-
Save greggersh/4556868 to your computer and use it in GitHub Desktop.
Redact a file from git repository
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
git filter-branch --index-filter 'git rm --cached --ignore-unmatch config/initializers/secret_token.rb' --prune-empty --tag-name-filter cat -- --all | |
git push origin master --force | |
git push origin production --force | |
git push origin discovery --force | |
git push origin rec --force | |
git push origin related --force | |
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