1

I have a git repository that has a .git folder that spans at 19GB. The folder used to be 4GB before adding a specific git submodule to the repository. I need to reduce the size of the .git folder.

Based on How to shrink the .git folder, I tried using

git repack -a -d --depth=250 --window=250 -f

Both with and without the -f option but the .git folder seems not to badge and stay at 19GB. I also tried running the same result on the submodule folder which (as expected) had not effect.

I have avoided using the git gc --aggressive --prune option as it seems not to be recommended.

Is there any way I can reduce the size of the submodule data on the top .git repository?

0 Answers0