We have a certain binary file in our git repository. Usually it's around 2MB in size.
One of our developers accidentally committed this file bundled with all of its dependencies, which bumped up the file to around 40MB.
Of course we committed a fixed version, but the main repository still has that useless chunk of 40MB of binary data we do not need. I can guarantee we will never need that file's history for that specific commit (or for any other commit for that matter - it's a compiled binary, we have the source versioned anyway).
How can I remove that blob of data to restore the repo size? A simple git gc
doesn't suffice, and I think I need some lower-level hacking I am not familiar with.