-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
We are trying to migrate a project made in Unity that wasn't using LFS in order to avoid the size limit that gives us GitLab (we already purchased a storage increment so now we can use 30Gb, 10Gb per project and 20GB shared).
We read all this topics in order to learn and try to do the process as good as possible:
- https://github.com/git-lfs/git-lfs/wiki/Tutorial
- https://github.com/git-lfs/git-lfs/blob/main/docs/man/git-lfs-migrate.1.ronn
- https://gist.github.com/dpschen/c14ef888fe780e79eefd5944d34a6c05
Steps followed in order to reproduce the issue
- We created a blank Unity project and add mp4(or images etc) resources in order to push some heavy content to the repo. We can see on gitlab that our repository usage is about 546MiB (in our case) and te LFS storage is 0bytes.
- Now we proceed to migrate our project to LFS so we are going to execute the following git commands:
- git lfs migrate import --everything --include="*.mp4" --verbose
- git push --force
After that last command ends, now we can see on our GitlabUsage that repository usage is around 560MiB and our LFS storage is around 508MiB. Here our first assumption is that something went wrong. We understood reading the documentation that using the first command previously written we will override past commits as well with the idea to reduce the repository usage.
At this point we thought that maybe it has something to do with the GC so we execute the following:
- git reflog expire --expire-unreachable=now --all
- git gc --prune=now
- At Gitlab we execute the HosueKeeping button (Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects).
When we return to check our Gitlab usage we see thar repository is using 546 MiB and LFS storage 508 MiB.
Is that the normal behaviour when you migrate to LFS? Is there any way in order to migrate and at the same time reduce the repository usage? Because right now it seems that we are storing duplicates.
Thanks in advance,
System environment
Project made in Unity.
GitLab as repo storage (website).
SO Windows10