Open dmytrob opened 1 month ago
Hi, I have a repository where some binary files were committed accidentally and many times. Thus, repository size is ~2.4GB if I do a fresh clone. Then I run BFG
java -jar bfg-1.14.0.jar --strip-blobs-bigger-than 3M .
output
Deleted files ------------- Filename Git id ----------------------------------------------------------------------------------------------------- 978-1-4939-0802-8.pdf | c8299da9 (29.4 MB) 9781400880034-005 (1).pdf | 1bd64246 (3.2 MB) Data.csv | 50be49fb (55.3 MB) Detumbling100.mat | 504f19c7 (880.5 MB) DetumblingTest3.mat | 68278076 (2.6 GB), 0ab3a26e (404.0 MB) Sat.stl | 2d2bfe17 (14.7 MB) Safehold.csv | 3a339cc7 (128.6 MB) Input.csv | f565161e (108.6 MB) Output.csv | 174a7910 (172.4 MB) simulation.mldatx | 5113cf65 (1.4 GB) ...
after that size of local checkout is
$ du -sch . 2,4G . 2,4G total
then I run
git reflog expire --expire=now --all && git gc --prune=now --aggressive
Output
$ du -sch . 150M . 150M total
Finally I push it to remote
git push --force
Afterwards I clone the repo again, in an another directory, and the directory has size of 2.4GB again.
2.4GB
Apparently I do something wrong, or in a wrong order, but can't figure out what exactly.
Could someone please clarify what is the proper workflow here?
Thanks!
Are you doing a mirror clone like the guide specifies? git clone --mirror git://example.com/some-big-repo.git
git clone --mirror git://example.com/some-big-repo.git
hi, yes, I tried both wit --mirror and without and the result is the same
--mirror
Hi, I have a repository where some binary files were committed accidentally and many times. Thus, repository size is ~2.4GB if I do a fresh clone. Then I run BFG
output
after that size of local checkout is
then I run
Output
Finally I push it to remote
Afterwards I clone the repo again, in an another directory, and the directory has size of
2.4GB
again.Apparently I do something wrong, or in a wrong order, but can't figure out what exactly.
Could someone please clarify what is the proper workflow here?
Thanks!