Last active
December 11, 2017 14:27
-
-
Save marschhuynh/399a421daaa426d8325d0a85903938ee to your computer and use it in GitHub Desktop.
List big file in git
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
git rev-list --objects --all | grep "$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -10 | awk '{print$1}')" | |
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