Created
November 29, 2017 23:19
-
-
Save BenMcLean/4257b60ad5e605dab3b19ec167e1361e to your computer and use it in GitHub Desktop.
Use BFG to strip out old web builds from my repositories that use Github Pages
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
param ($name) | |
Set-PSDebug -Trace 2 | |
git clone --mirror https://github.com/BenMcLean/$name.git | |
java -jar bfg.jar --delete-folders dist "$name.git" | |
cd ./$name.git | |
git push | |
cd.. | |
Remove-Item -Path "$name.git" -Recurse -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment