Is there a scenario where BFG doe not shrink a repo ?
I have used BFG repo multiple times over several repos with success. Great tool !
However, for one specific repo, I am not getting any reduction at all. The strange this is that I used BFG repo on this a few days ago and saw a 500 MB reduction but now after downloading a fresh repo and following the steps, I see an increase in the size (see pics below). To make sure my eyes weren't deceiving me, I re-ran BFG for another large repo and it was redcued by a third as expected. Only this repo is an issue.
So, before running BFG Repo Cleaner for this repo (ie running the git mirror command), this is the size of the my-big-repo.git folder
After running
java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 20M some-big-repo.git
this is the size. Which is okay, because the repo hasn't been culled yet
Plenty of files have been deleted, as I see in the output
Filename Git id
---------------------------------------------------------------------------
binhss.fru | 6ef438da (22.1 MB)
158253.mp4 | ca14075d (21.0 MB)
24605.zip | 5b6c4eab (23.5 MB)
24615.zip | 5423c47d (25.1 MB)
40786.zip | 1e625ec7 (25.8 MB)
40792.zip | af634c8e (25.2 MB)
littleBit.zip | 3a6a2563 (51.9 MB)
XOOMOT.zip | 29f8097e (21.7 MB)
Rapis.mp4 | 9b83c06c (24.0 MB)
Database_Backup.zip | fc2657d9 (76.4 MB), e9033a52 (152.9 MB), ...
Erskinine.dll | 671d580e (24.7 MB)
However, after running the last commands
$ cd some-big-repo.git
$ git reflog expire --expire=now --all && git gc --prune=now --aggressive
this is the size
How is this possible ?
Are all those files deleted in the latest commit?
The BFG treats your current commits as sacred, by default:
http://rtyley.github.io/bfg-repo-cleaner/#protected-commits
By default, the BFG will clean out old versions of your files, but will carefully preserve the contents of your latest files.
See also https://github.com/rtyley/bfg-repo-cleaner/issues/182
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.