Search code examples
unity-game-enginegithubgit-lfs

Github LFS with Unity unable to push file


I downloaded LFS for a new Unity project but it's not recognizing the "lld" file:

File Library/PackageCache/com.unity.burst@1.6.6/.Runtime/hostmac/lld is 106.20 MB; this exceeds GitHub's file size limit of 100.00 MB

I've followed this thread which details the same issue, but still the same. I also added ".file" to .gitattributes.

*.file filter=lfs diff=lfs merge=lfs -text

What am I missing here?


Solution

  • You are attempting to add the Unity folder Library to source control. You should not do this. This folder is essentially a Unity Editor cache of expanded and/or editor-ready items originating in the Packages folder and is automatically re-generated by Unity if deleted.

    As Unity says:

    Set up an ignore filter for the unversioned Library directory

    Once you ignore this folder, Git will not attempt to add it to source control let alone Git LFS.

    For a typical Unity project, only the green-boxed folders below should be added to source control:

    enter image description here

    See also