Hacker News new | ask | show | jobs
by rubyist5eva 2092 days ago
You should use git-lfs for these files. Probably some wizardry with `filter-branch` and adding these files to lfs could debloat your repo once you do a fresh clone from that.
1 comments

Yeah, we used git-lfs for a while but ultimately decided we didn't need to version the static files and just plopped them on S3 and added a step to the deploy to pull them in.

Basically, we initially thought we needed point-in-time versions of a bunch of data files, and later decided we didn't care about point-in-time.

Since I just saw this comment: Note that git-lfs stores your binaries in its own directory inside .git (I currently have no git-lfs-enabled repo at hand, but I think it was `.git/lfs/objects`).

That means that there might still be a lot of binaries inside your .git directory because LFS put them there. Those object files are not managed by Git itself, so forcing GCs through Git won't help in this regard, either.

You might also want to look into `git lfs prune`: https://github.com/git-lfs/git-lfs/blob/master/docs/man/git-...