Increasing storage space when converting from Fossil to Git to Git LFS

136 Views Asked by At

We are currently tracking Siemens PLC programs (TIA projects) in Fossil repos. Now we have to move all repos to Bitbucket and hence I started testing the conversion from Fossil to Git as Bitbucket only supports Git.

One special thing about our repos is that we track the whole project in there including 2 binary project files as only so we can recover the whole project from the repo necessary for opening in TIA (Siemens IDE). These 2 files are not very large (1 between 5-10MB and one around 1MB), however we have quite many commits meanwhile as the projects evolve since a couple of years.

The conversion with Fossil export --git was done successfully for one of our projects.

But ... her comes my point 1: The original Fossil repo had a size of ~600MB. The resulting Git repo now has a size of ~1,5GB which means almost 3times the size of the Fossil repo. Does anyone know why this is? My best guess is that Fossil seems to only track diff artifacts - even for binary files while Git always trackes whole files. Or does Fossil just compress better?

Bitbucket only allows repo sizes < 2GB. So when moving this project to Bitbucket as is we would run into problems very soon. Hence I wanted to test tracking the 2 binary files by Git LFS instead. I used BFG to convert the history of the repo following the guide provided here: https://docs.gitlab.com/ee/topics/git/lfs/migrate_to_git_lfs.html with the exception that I mirrored the repo to another place locally as I do not have it on any server yet.

This brought me to my point 2: After running BFG and git reflog/gc I ended up with a smaller repo but the LFS objects folder is now ~3,7GB (what the hell?). I googled a lot up to now but I could not find a sufficient explanation for this strange thing. Does anyone know what the reason?

Thanks heaps :-)

0

There are 0 best solutions below