Unreal Engine with Git LFS is worth it?

Hello, I did some tests with Git LFS to illustrate with numbers the difference between using it or not.

I created two projects in the unreal engine, one using LFS and the other not.

I’m using the unreal engine 5 with the “ThirdPerson” template in c++, with nothing else added, just the pure template.

In the first print I show the repository that is using LFS, its size on github was only 84kb,
since the binary files are stored elsewhere, and there we only have the pointers generated by LFS.

In the second print I show the size of my storage (the other place I mentioned above, where they are actually stored
my project’s binary files)

In other words… LFS stored 1010Mb of binaries in another location (my storage) and my github repository did not store it
these files, only stored the pointers that point to these files, leaving this remote repository with
just an incredible 84kb

In the third print I show my second project that is not using LFS, I am using the same template (ThirdPerson)
and look at the absurd difference in size… The remote repository was left with 917Mb, since this time, it is actually
storing the binaries and not pointers, as I’m not using LFS.

This means that using LFS drastically reduces the size of your remote repository, making it possible to perform
operations such as pulls, clones, etc., much faster and making the project much lighter

But not everything is perfect. This “Storage” I mentioned has a limit of 1gb on github, unless you choose to
pay for more packages and increase this space, and in addition to storage, we have “Bandwidth”, which is used when pulling from the repository,
In other words, you can perform up to 1GB of pulls from that project per month, since this number is reset every month.
On the other hand, “Storage” is fixed and never resets, and is deducted per github account and not per repository, if
If you spend a total of 1GB making pushes using LFS, you will have to buy more packages to continue using this tool…

And you can already see that just the “ThirdPerson” template from Unreal Engine 5 already cost 99% of that 1GB.
In other words, it is practically impossible to use LFS on github in a real project without having to pay for more packages, since just the pure template already costs 99% of this resource (almost 1gb).

So the discussion remains, is it worth paying for more packages to use LFS in an Unreal project in scenarios where you just want to version your project for the record, and
No one else will be doing pulls and contributing besides you?

3 Likes

The integration of Git LFS has a lot of advantages.
As you’ve said, strip out binary data from repository and putting them into LFS reduces the size of repository a lot, but it’s not only it. For example when you clone the repo, you clone only the little repository, and then download only the necessary binary data, instead of downloading the entire binary history, so also inside your pc the size of the repo is smaller.
In addition to this, Git LFS adds git commands for working better with binary files, like the locking. This reduces a lot the problems when working with those data, for example because usually they cannot be merged, so the lock is necessary then one is updating the file, and this avoid concurrent changes that cannot be solved by a normal merge, things that’s instead possible with text.
So yes, Git LFS is worth it because is specifically designed to overcome the most common and annoying problems that overcome when using git with repository with binary assets, and it became a valid alternative to perforce.
It’s worth paying it, but if you don’t want to, you can use Azure Devops since for personal projects you don’t have space limits for Git lfs.

It’s also worthwhile to consider alternatives to github if you’re going to look into Git LFS. Github is notoriously hard to control LFS objects through. You could explore either a self hosted git server (could still be cloud based), or an alternative like BitBucket.

If you’re working solo you can also just consider having regular backups to an external drive or something, the main benefit you get from setting up a cloud-based git remote is that your work is actually saved in a space that, if your own hardware fails, you’re not totally losing the work/backups you’ve created so far.