Last active
February 27, 2021 21:16
-
-
Save tpiekarski/3a6f7cfbcaa80941b27220c5b27748db to your computer and use it in GitHub Desktop.
Remove accidentally commited big files from GIT
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
# Get BFG Repo-Cleaner (https://github.com/rtyley/bfg-repo-cleaner) | |
wget https://repo1.maven.org/maven2/com/madgag/bfg/1.13.2/bfg-1.13.2.jar | |
# Removing by filesize | |
java -jar bfg-1.13.2.jar --strip-blobs-bigger-than <MB> <repository> | |
# Removing by filename | |
java -jar bfg-1.13.2.jar <filename> <repository> | |
# Prune reference logs, cleanup and optimize | |
git reflog expire --expire=now --all && git gc --prune=now --aggressive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment