Hey folks!
I’m fairly new to Unreal, let alone setting up an Unreal 5 project on version control for a team. We use Git for our version control, so obviously we gotta make sure we have certain things filled out in our .gitignore and .gitattributes (for Git LFS).
What do you normally have filled out in your ignore and attributes files for a typical Unreal 5 project?
Thanks!
Take a look at the plugin maintained by the Project Borealis developers:
https://github.com/ProjectBorealis/UEGitPlugin
It’s a refactoring of the more popular ‘Git LFS 2’ plugin by Sébastien Rombauts (who now works at Unity on PlasticSCM) and has more development activity.
I think Git LFS itself works fine. I use it for a repository with ~150 GiB of assets and ~10,000 commits. The performance is great and for source code heavy projects I think it’s fantastic.
The problem is with the file locking support in Git LFS. The more robust implementation was never implemented ( https://github.com/git-lfs/git-lfs/issues/1844 ), and the PB plugin implements some of the features described there, but it’s still lacking in some ways.
The locking API is essentially unable to do anything beyond:
It has no awareness of branches of any kind.
Without the plugin you cannot ensure that people won’t modify stale versions of assets, and you cannot ensure that a user will not unlock an asset before they’ve pushed it upstream, creating a similar issue of another user locking and modifying a stale version of the asset, even if the prior user had locked it at some point. I would enforce a policy of “only unlock after push” to mitigate these issues, and only unlock once the asset is pushed to a branch that’s tracked by the plugin. If you do that, users won’t be able to lock and, depending on your editor config, modify the asset until they have the latest version of it.
Anyway, Steve Streeting has a good post on this. He uses the above plugin and was actually involved with Git LFS itself (as well as having written Ogre3D and the SourceTree Git GUI client*):
https://www.stevestreeting.com/2020/08/09/my-unreal-engine-vcs-setup-gitea-git-lfs-locking/
*Atlassian has left SourceTree to rot after he left, so check out a better Git GUI client like ‘Git Fork’. $50, but it has an unlimited free trial.
EDIT: As for your original question… in addition to Steve’s post, check out the
.gitignore
and.gitattributes
configuration Project Borealis use (though their project is 4.27.2 iirc - it should be very similar to what you want):https://github.com/ProjectBorealis/PBCore/tree/main