noodle
noodle copied to clipboard
Investigate big git folder
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?
that's the flaw of git, git record every changes with lead up to big file
im sure no one want it to be squash merged. git LFS perhaps? https://git-lfs.com/
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.