Hello everyone,
I'm facing an issue with Git LFS and would appreciate some guidance. I have a Git LFS repository where I've been working on a branch that involved several commits, each modifying a binary file. This resulted in multiple versions of the file being stored in LFS. Before merging this branch into main, I squash the commits to maintain a clean history and, more importantly, to reduce the LFS storage usage.
However, I've noticed that even after squashing, the unreferenced file versions are not automatically deleted, which still consumes LFS space.
Is there a way to automate the cleanup of these unreferenced files rather than having to do it manually? Perhaps through a post-merge hook or another method?
Thanks in advance for your help!