-
Notifications
You must be signed in to change notification settings - Fork 2
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
Tip: leverage Git LFS to separate source-code from media #50
Comments
This is a very good point! I'll do this tonight |
@n-hebert did some digging - there aren't huge files stored in the repo any more, so figured it must be a git history thing / LFS might not actually help much. Rang BFG repo cleaner and removed anything in the history over 1mb, hopefully that helps! |
hey @toddmedema . BFG is okay, but I can report that the repository still definitely has the files.
It will take a force push and deletion of all the related objects. It's quite an involved process. |
Ugh, that's frustrating, BFG said it removed a bunch of stuff. I haven't worked with LFS before, would it actually work if the items are just in the history? If not, we may need to explore the force push / delete option (I did find some instructions for that online too, although they all had a bunch of danger / warning signs, so I wanted to try BFG first) |
Yeah, that's why I mentioned in the top post to migrate all objects and then do the force push/delete. The danger buttons are all going to be your friend on this one. Again, I've done this a lot in my line of work, so feel free to dm me on Climatebase and we can set up a quick video call to do it. I usually get it done quite quickly. |
Hey @toddmedema , I just spotted that there's actually migration already built into Git LFS now. It looks like it'll do it all on your side, effortlessly.
courtesy of: https://github.com/git-lfs/git-lfs/wiki/Tutorial#migrating-existing-repository-data-to-lfs It actually should automagically wipe all of the history of the large objects. I'll leave it to you for this instead of contributing my alternate repo, as this is supposed to be one-touch, require privs, but probably work best on the o.g. repo (this one), so best for you to run it. Let me know if that sounds good and/or how it works! |
@n-hebert cool! Looks like it worked, just pushed that, and now a fresh clone looks like only ~30Mb on wire/70Mb on disk! |
Excellent! I Just confirmed here and yeah, the
Yet... quite oddly, I don't actually think it migrated the files 😆 Do you want to take a peek at that |
It might just be that I mis-used Just guessing! Still learning about the migrate command. |
|
Does it allow one at a time migration?
Maybe we can do it the boring way. |
Looks like that worked! |
Although now when I try to clone, I get some errors: Downloading services/app/src/audio/basic/high.mp3 (9.1 MB) Errors logged to '/Users/todd/code/bob/electrify/.git/lfs/logs/20240318T203324.293874.log'. |
Yep! I'm digging into that, too. On the bright side, we're very on track. Once the objects are in the LFS, nothing more to worry about; we're there. And I see that LFS now auto-pulls itself so, all that fuss about hooks I mentioned earlier has been relegated a concern of the past. |
I wonder if the tutorial failed to specify this |
hmm ... did you do the |
Woohoo! After struggling with git credential manager / auth stuff for a bit, I got |
🎉 💥 🥳 🎉
RESOLVED ✔️ |
WOOHOOOO! Thank you so much for your help! |
Happy to help and looking forward to collab'ing further on the slimmed down repo now that it's ready! |
Took a stab at cleaning up the unused dependencies to help further (was a little embarrassing... like I mentioned, copied it over from https://expeditiongame.com/ without a deep clean) Any particular issues strike your fancy? (or, any ideas for issues / improvements from your experience that I haven't spotted?) |
I'll probably pitch in with the routine upgrades and then see what's to do next, that'll let me get some time to ramp up on the code internals and conjecture better about what other little things there are to do. |
Hello!
I see that media has crept into the repository itself, causing the clone to be very large and slow.
https://git-lfs.com/ and other solutions can help to reduce the size back down so that building can occur with or without all media assets, and permit flexible changes to the media without growing the repo to absurd proportions.
A git repo of this size should generally be under a megabyte, but the current clone is ~170MB and that'll only get worse.
Fix Steps
This is a good step to take before going too far or including other collaborators. While it's just yourself coding on it, this is effortless to do. As soon as someone else begins coding, you've lost a lot of the ability to make this change.
Therefore, this is somewhat of an "urgent fix needed". Happy to help with further tips where you need them!
The text was updated successfully, but these errors were encountered: