Hi there,
in our team we have a free account repository with Unity project uploaded. The size of this project on the PC storage is ~30 Gb without Libraries, Temp, etc. We use git lfs to store all the large files.
This is how gitattributes looks like:
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge text=auto
*.anim merge=unityyamlmerge text=auto
*.unity merge=unityyamlmerge text=auto
*.prefab merge=unityyamlmerge text=auto
*.physicsMaterial2D merge=unityyamlmerge text=auto
*.physicMaterial merge=unityyamlmerge text=auto
*.asset merge=unityyamlmerge text=auto
*.meta merge=unityyamlmerge text=auto
*.controller merge=unityyamlmerge text=auto
## git-lfs ##
#Image
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.bmp filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.ai filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.tif filter=lfs diff=lfs merge=lfs -text
#Audio
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.ogg filter=lfs diff=lfs merge=lfs -text
#Video
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
#3D Object
*.FBX filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
#ETC
*.a filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text
*.unitypackage filter=lfs diff=lfs merge=lfs -text
*.aif filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.rns filter=lfs diff=lfs merge=lfs -text
*.reason filter=lfs diff=lfs merge=lfs -text
*.lxo filter=lfs diff=lfs merge=lfs -text
*.bytes filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text
*.so filter=lfs diff=lfs merge=lfs -text
*.chm filter=lfs diff=lfs merge=lfs -text
LightingData.asset filter=lfs diff=lfs merge=lfs -text
Here you could see that all possible large files are added into the configuration. I’ve checked the local repository with git-sizer tool and found that the largest file here is about 18 Mb.
However, and here’s where the issues start, we have 7 Gb repository size on gitlab even with just one commit pushed. Every light rebake creates files that marked as LFS but increase the repository size drastically.
The questions are:
- Is it true that LFS files affect the repository size and we’re limited with LFS files?
- If so what is the best option to store large Unity project on cloud gitlab? Is there any paid license or is it applicable just for self-hosted servers?