My team's repo on Bitbucket was 1.34GB due to some static assets (videos, images)
I've followed instructions from BFG Repo Cleaner
and my repo is now 2.37GB which is over our 2GB quota and it is now read only.
The commands I've run were pretty much what's on the BFG Homepage,
- git clone --mirror git://example.com/some-big-repo.git
- java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 100M some-big-repo.git
- cd some-big-repo.git
- git reflog expire --expire=now --all && git gc --prune=now --aggressive
- git push
After I run this commands my repo grew to the 2.37GB mark. However if I run git count-objects -v
my size-pack is now: size-pack: 1073518
as opposite as before it was size-pack: 1213524
. So in theory my repo is smaller.
I dont know because this is hosted in Bitbucket cloud If I need them to run anything on the server or not, some places (gitlab, github) seem to need "them" to run git gc
on the server.
Is this necessary? Is there anyway I can undo all my changes with that git push
? I have the some-big-repo.git.bfg-report
report with all the changes, but I dont know how to use that report to revert my changes.