Large files with git-lfs, which files do you track?

Hi,

git-lfs version 1.0 has just been released and is now also supported by Github. To be able to keep specific files separate in the large files store you have to track them with the following command: git lfs track “*.psd” (This example keeps all your photoshop files separate)

I’d like to use Git for my level design but the questions is which files within the directory structure should I keep in the LFS? Does anyone have a list I can use?

Cheers,
Olivier

[update: see other answer, now I think you should track all uasset if one of them goes over the limit]

Anything large that changes often would benefit from LFS. Unfortunately, some uasset files are small, and some uasset files are large. So you couldn’t select the files by extension like you do with your photoshop files. And it really depends on what changes often.

So IMHO, the best way to use Github LFS with UE4, is manually when you see or expect a large file to change often.

Would like to know the answer to this as well. For now, i find all files in explorer, sort them by size, track folders with large files with git-lfs.

Is there any reason why you couldn’t add all uasset files as LFS? Is there a downside to this?

I would like to know the answer to this as well. Why not just track all uasset and umap files? I usually selectively add them, but still would like to know.

You might as well track all uasset files.
git lfs track "*.uasset"

Why not all the files? LFS is an extension to git, mainly so you can put large files on github.com which prevents files over a certain size. Git is designed as a server-less VCS, so you can push and pull to a folder on your hard drive, your workmate’s computer, send bundles via email. These features don’t work as smoothly with LFS. If you use them you’ll have headaches with all the LFS tracked files. Practically however, most people don’t know about or use these features. They just use Git as a better alternative to SVN.

So if ever in the future you want to go to a different server other than github.com, you’ll have to do extra work with all the LFS files. Like download a different LFS client. Therefore you should try to limit LFS files to just the ones that could be big.

(Now that LFS has been out a while, I’m changing my opinion.)

I’m changing my opinion, new answer below, yes you should track all uasset if even one of them is large.

The downside is that they can’t be merged. The upside is merging them is a pain in the ■■■ anyway and you probably just want to pick one version if there’s a conflict.

That’s not entirely true, i think. Files under LFS can be merged (you can set this up in .gitattributes file). However AFAIK .umap and .uasset files arent very merge-friendly, so you would need some sort of a merge-tool for that. But i agree in most cases it’s better to just avoid conflits for such files.