noodle icon indicating copy to clipboard operation
noodle copied to clipboard

Investigate big git folder

Open piprett opened this issue 2 years ago • 2 comments

When cloning the git repository with git clone, you can notice it is very big. (Over 470mb !) I've found that the big file is a .pack file inside of .git/objects/pack.

  • What specifically is this file?
  • Can we remove it, if so how?

piprett avatar Nov 06 '23 14:11 piprett

that's the flaw of git, git record every changes with lead up to big file

xhayper avatar Nov 06 '23 14:11 xhayper

im sure no one want it to be squash merged. git LFS perhaps? https://git-lfs.com/

CustomIcon avatar Dec 13 '23 08:12 CustomIcon

If anyone comes across this in the future, we solved it with something similar to:

java -jar ~/Software/bfg/bfg-1.14.0.jar --delete-folders .yarn --no-blob-protection --strip-biggest-blobs 10
git reflog expire --expire=now --all && git gc --prune=now --aggressive
git push -f

Then removed all the other branches on the repo. See bfg-repo-cleaner.

piprett avatar May 14 '24 18:05 piprett