Last active
July 6, 2018 14:57
-
-
Save abbasnaqdi/53d1044a71501ef3cc1d7a942d235d4c to your computer and use it in GitHub Desktop.
git ignore force for all history
This file contains hidden or 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
//use this comment in terminal in project directory | |
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 | |
git push origin --force --all | |
//or | |
bfg --delete-files YOUR-FILE-WITH-SENSITIVE-DATA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment