-
-
Notifications
You must be signed in to change notification settings - Fork 53
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 file size #512
Comments
Thanks for the detailed report! Hmm, one possibility is that it's just many rounds of many UFO font sources, each with many small files. I'm not really a git wizard. Do you (or anyone else) have any suggestions of what to do to trim down the size of git repos? |
I have no idea how to fix this. I'm going to do some reading and try to figure it out. |
Okay I found a possible solution. I'm documenting the process here but will make a fork of the repo and try it out there. If everything has worked as desired, I'll open a pull request. My working hypothesis is that the offending files seems to be
While the files inherently aren't equal to a couple gigabytes, the deltas that reference them over several commits could be multipliers. Process:
Sources:https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history Contents of
|
Hi @arrowtype I tried a couple of things but they didn't work. I think you might need to talk to someone who has a deeper understanding of version control to help out with this. Looking at this problem, as a matter of policy, we've made a change (internally within Universal Thirst) to not upload font binaries, PDFs, images and other binaries in new repos. Feel free to close this and apologies for the bother :) |
Of course I cannot speak for @arrowtype, but if I were the author of this repo, I would not find anything about this thread that was a bother or needs apology. I think many people would be genuinely curious and interested to see if there is something that can be done about the unexpectedly large size. Edit: I guess 4 GB including history is not so bad, judging by this document about building a different font:
It then goes on to give an example of a limited-depth clone command for that font. So, it would seem the size of the (main, official) Recursive repo is actually not all that unexpected or even unusually large. And maybe the normal thing to do for people who want to play around with a local clone is to not download all the history. |
For people who don't need the whole repo history, which is likely no one outside of @arrowtype, use a shallow clone. Get only the last 20 commits across all branches:
Only the most recent commit and only the main branch:
This shallowest clone is best for one-off or consume-only copies, because not all git commands will work later, e.g. switch to a branch created before the cloning date. Disclaimer: I'm not all that git proficient, but learned this trick out of necessity when working with a 20 year old project with very long clone times. |
Hey, thanks so much for the feedback and insights, @kalapi, @jkyeung, and @maphew! Sorry I've been slow to respond, but I truly appreciate it. I will try to add the I suspect the thing that might take the most time in downloading is that in this repo, I have been committing changes to "build prepped" UFOs, and I have done many, many builds. Each UFO is thousands of tiny files, so I think that probably stacks up a lot. I now put such prepped sources in the .gitignore file of font repos. I'll try to look further into the resources posted by @kalapi to test out pruning some of those unnecessary sources. |
@maphew you explained things well! Is it alright if I basically copy-paste your advice into the readme? |
@maphew you explained things well! Is it alright if I basically copy-paste your advice into the readme?
Oh, yes of course. Except, I have to recant, it's not good advice post 2020!
Use a _partial clone_ instead:
`git clone --filter=blob:none (url)`
Shallow clones (using `depth` parameter) should only be used in "use and
discard" scenarios such as Continuous Integration pipelines. Shallow is
still the fastest cloning mechanism but unreliable for any later git work
other than git pull.
Further reading:
https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
|
Problem description
Hi @arrowtype, this is not a bug report, more like a meta issue with the repository itself. I was doing some winter housekeeping on my Mac and found that the Recursive repository is 3.98 GB! And this isn't because of a file (or group of files) in the current state of the repo but probably because of past commits in the hidden
.git
folder. Honestly I don't know what these files represent. I wonder if you have any insight?Expected behavior
No effect on font binaries
Screenshots
To Reproduce
I use a Mac app called Grand Perspective which helps visualise large data blocks on the hard drive. One of the larger chunks was the Recursive repository folder and I was really surprised.
Environment (please complete the following information):
main
)Additional context
N/A
The text was updated successfully, but these errors were encountered: