Created
July 6, 2018 16:29
-
-
Save seabbs/693c6e1b705805a121629c76db8eb946 to your computer and use it in GitHub Desktop.
Wrapper function to remove large files using BFG. Requires a version number and repo name
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
#!/bin/bash | |
cd $repo | |
git reflog expire --expire=now --all && git gc --prune=now --aggressive | |
cd .. | |
java -jar bfg-$(version).jar --strip-blobs-bigger-than 100M $repo | |
cd $repo | |
git reflog expire --expire=now --all && git gc --prune=now --aggressive | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment