Last active
January 3, 2020 20:57
-
-
Save mccurdyc/11edc66e870881ef91ba530c5cc208c3 to your computer and use it in GitHub Desktop.
Git clean repo
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
# https://rtyley.github.io/bfg-repo-cleaner/ | |
# https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery#Removing-Objects | |
java -jar ~/Desktop/bfg-1.13.0.jar --strip-blobs-bigger-than 5M . | |
rm -Rf .git/refs/original | |
rm -Rf .git/logs/ | |
git count-objects -v | |
git tag | grep -v ignorethis | xargs git push --delete origin | |
git tag | grep -v ignorethis | xargs git tag -d | |
git push --tags --force | |
git count-objects -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment