Cleaning up binary blobs in a git repository -
Cleaning up binary blobs in a git repository -
we have binary file in our git repository. it's around 2mb in size.
one of our developers accidentally committed file bundled of dependencies, bumped file around 40mb.
of course of study committed fixed version, main repository still has useless chunk of 40mb of binary info not need. can guarantee never need file's history specific commit (or other commit matter - it's compiled binary, have source versioned anyway).
how can remove blob of info restore repo size? simple git gc doesn't suffice, , think need lower-level hacking not familiar with.
if can create file source code, doesn't belong repository @ all.
if want remove version of file repository, have rebase repo, ideally using git rebase -i. problem it's rewriting history , shouldn't commits public (that is, shared between multiple users). see recovering upstream rebase how create work if want to.
after rebase, file remain in repository while, removed automatically eventually. , won't transmitted @ all, if utilize git clone or git pull.
git
Comments
Post a Comment