Why does `git` download 355 MBytes when cloning `satip`?!
jack@leonardo:~/dev/ocf$ git clone [email protected]:openclimatefix/Satip.git
Cloning into 'Satip'...
Enter passphrase for key '/home/jack/.ssh/id_ed25519':
remote: Enumerating objects: 2221, done.
remote: Counting objects: 100% (101/101), done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 2221 (delta 44), reused 54 (delta 0), pack-reused 2120
Receiving objects: 100% (2221/2221), 354.96 MiB | 5.65 MiB/s, done.
Resolving deltas: 100% (1215/1215), done.
jack@leonardo:~/dev/ocf$ du -h satip/
8.0K satip/.git/logs/refs/remotes/origin
12K satip/.git/logs/refs/remotes
8.0K satip/.git/logs/refs/heads
24K satip/.git/logs/refs
32K satip/.git/logs
8.0K satip/.git/info
4.0K satip/.git/objects/info
356M satip/.git/objects/pack
356M satip/.git/objects
64K satip/.git/hooks
4.0K satip/.git/branches
8.0K satip/.git/refs/remotes/origin
12K satip/.git/refs/remotes
8.0K satip/.git/refs/heads
4.0K satip/.git/refs/tags
28K satip/.git/refs
356M satip/.git
12K satip/.github/workflows
16K satip/.github
8.0K satip/tests
36K satip/satip
356M satip/
So almost all the space is being taken up by .git/objects/pack
I presume this is old testing data that's been removed from master, but still exists in the git history?
We could try removing it with something like in here: https://github.com/18F/C2/issues/439 it rewrites the git history, but I don't think we really lose anything?
yeah, I agree... if we can surgically remove the old test data from the git history without also losing the old code, then let's do it!
Could always just clone the latest push
https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-and-when-to-perform-a-depth-1-git-clone