Setting up a UE4 Project for Version Control with Git
· 1 min read
Project Setup with Git
Create an Unreal C++ Project (instead of BluePrint): it’s easier to extend a C++-based project with blueprint than the other way around. We will use the newly created project folder as the repository root. That way, you can rename the project folder without affecting the way Git sees it (e.g. .gitignore paths).
Prepare it as the Git repository:
Initialize Unreal project folder locally as git repo (can be done via Unreal directly, but manual gives more control regarding initial commit, .gitignore, etc., whereas Unreal directly commits some project files.).
Add .gitignore (use custom .gitignore (preferred) or the .gitignore created by Unreal Engine).
Commit the .gitignore file.
Set up LFS for large binary files:
Initialize Git LFS.
Add a .gitattributes.
Commit the .gitattributes file.
Commit the Unreal Project files (track binary files with LFS).
Initialize Git-Flow or create a “develop” branch manually.
Create a plain remote repository (no initial commit) on GitHub or other provider.
Add remote repository as a remote in local Git (connecting the two) and push.