Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repository size does not change after running BFG and pushing to remote #518

Open
dmytrob opened this issue Jul 16, 2024 · 2 comments
Open

Comments

@dmytrob
Copy link

dmytrob commented Jul 16, 2024

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.

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!

@arpan3t
Copy link

arpan3t commented Jul 18, 2024

Are you doing a mirror clone like the guide specifies?
git clone --mirror git://example.com/some-big-repo.git

@dmytrob
Copy link
Author

dmytrob commented Jul 19, 2024

hi,
yes, I tried both wit --mirror and without and the result is the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants