We have a large repository with 280 gigabytes. We wanted to reduce this repository using Gitlab and Git lfs by tracking some files and moving them to the lfs storage. However, this only worked to a limited extent because although the files that were tracked were moved to lfs and replaced by pointers, the overall repo size increased from 280 GB to 500Gb.
Our goal was to reduce the repo size. What did we do wrong, or is it even possible using git lfs? It is also important to us to retain the existing history.
What have we done?
git lfs install
git clone <repository-url>
git lfs track "*.iso"
git add <file>
git commit -m "Add large files with Git LFS"
git push origin main
git lfs migrate import --include="*.iso"
git add .
git commit -m "Migrate existing large files to Git LFS"
git push origin main