Hacker News new | ask | show | jobs
by fragmede 603 days ago
> Large blobs happens when someone accidentally checks in some binary, so, not much you can do

> Retroactively, once the file is there though, it's semi stuck in history.

Arguably, the fix for that is to run filter-branch, remove the offending binary, teach and get everyone setup to use git-lfs for binaries, force push, and help everyone get their workstation to a good place.

Far from ideal, but better than having a large not-even-used file in git.

4 comments

There's also BFG (https://rtyley.github.io/bfg-repo-cleaner/) for people like me who are scared of filter-branch.

As someone else noted, this is about small, frequently changing files, so you could remove old versions from the history to save space, and use LFS going forward.

The main issue is not a binary file that never changes. It’s the small binary file that changes often.
filter-repo is the recommended way these days:

https://github.com/newren/git-filter-repo

It’s easier to blame Linus.