Skip to content
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

website repo is very big #47

Open
ntrel opened this issue Mar 29, 2022 · 4 comments
Open

website repo is very big #47

ntrel opened this issue Mar 29, 2022 · 4 comments

Comments

@ntrel
Copy link

ntrel commented Mar 29, 2022

Just thought I'd mention git cloning the website seems like it will download > 1GB of data! I'm writing this as it clones. Is this really necessary? It's very surprising.

@ntrel
Copy link
Author

ntrel commented Mar 29, 2022

I cancelled the clone and used --depth 1. Apparently that makes git fetch slower though.

@Verdagon
Copy link
Contributor

Verdagon commented Mar 30, 2022

Oh wow. You're not kidding, that's ridiculous!

I think I know what's going on: until recently, we've had all past release binaries as part of this repo (~80mb per release per OS) and once it was getting too big I removed them, but I bet they're still in the git history!

I'll find a way to cut them out of the history, and if all else fails, I'll just nuke the git history for this repo.

Thanks for reporting this! I likely wouldn't have found this for a while, since I already have a clone on my machine.

@spartanatreyu
Copy link

spartanatreyu commented Aug 17, 2023

There's two options that come to mind:

  1. Rip out all the past binaries from the repo
  2. Keep the binaries, but migrate them out of the git repo in to git-lfs

Option 1: Binaries begone

If you want to rip out all the old binaries then I'd suggest using: git-filter-repo.

You can use it to automatically rewind each commit back to the first commit, then replay each commit with a few changes that you specify as CLI options.

That could be things like:

  • Dropping each file larger than 8 MB
  • Renaming a path from ddocs to docs
  • Replacing the string SuperSecretApiKey to Redacted

Option 2: Binaries yeet

If you still want to keep the binary files but not keep them inside the repo, you can use git-lfs-migrate. This will upload the binaries up to a git-lfs storage host and replace the binary files in your repo with tiny pointer files that contain a link in the file on the git-lfs storage host.

@Verdagon
Copy link
Contributor

I had no idea that git-lfs-migrate was a thing! I think that's exactly what we need here. Thanks for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants