Last active
November 9, 2018 21:48
-
-
Save ridingintraffic/c39e48a8ab1f0983eb0655cfa708848b to your computer and use it in GitHub Desktop.
BFG-tldr
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
# prework assuming macos | |
# visit for latest version https://rtyley.github.io/bfg-repo-cleaner/ | |
# creates some folders, downloads bfg symlinks it and paths the file to your bash profile | |
mkdir -p /Users/$(whoami)/.local/bin/ | |
curl -o /Users/$(whoami)/.local/bin/bfg-1.13.0.jar http://repo1.maven.org/maven2/com/madgag/bfg/1.13.0/bfg-1.13.0.jar | |
chmod +x /Users/$(whoami)/.local/bin/bfg-1.13.0.jar | |
ln -s /Users/$(whoami)/.local/bin/bfg-1.13.0.jar /Users/$(whoami)/.local/bin/bfg | |
echo $PATH:/Users/$(whoami)/.local/bin/ >> /Users/$(whoami)/.bash_profile | |
source /Users/$(whoami)/.bash_profile | |
#commands | |
git clone http://github.com/bigfiles.git | |
cd big_files | |
git gc | |
cd ../ | |
java -jar bfg --delete-files <myhugefilename> big_files | |
cd big_files | |
git reflog expire --expire=now --all | |
git gc --prune=now --aggressive | |
# repo is ready to push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment