UE5 GitHub Desktop and Git LFS Setup
UE5 GitHub Desktop and Git LFS Setup
Unreal Engine projects can become large, messy, and painful to recover if you do not use version control. One accidental delete, one broken Blueprint, one bad plugin change, or one corrupted file can cost you hours or even days.
In this tutorial, you will set up Git, GitHub Desktop, and Git LFS for an Unreal Engine 5 project. You will create a local repository, use the Unreal Engine .gitignore template, publish the project to GitHub, add a .gitattributes file for Large File Storage, and learn the basic commit, push, and discard workflow.
This is the workflow you should use if you want your Unreal projects to stay backed up, organized, and easier to collaborate on.
Watch the video on YouTube: How to Set Up Git and GitHub Desktop for Unreal Engine 5 LFS Guide
Subscribe for more Unreal Engine tutorials: Rambod YouTube Channel
What You Will Set Up
- A Git repository for an Unreal Engine 5 project
- GitHub Desktop for a beginner-friendly source control workflow
- The Unreal Engine .gitignore template
- A .gitattributes file for Git LFS tracking
- A clean commit and push workflow
- A rollback method using discard changes
- LFS storage monitoring through GitHub account settings
Why Unreal Engine Projects Need Version Control
Version control is not optional if you are serious about game development. It protects your project from mistakes and lets you track what changed over time.
Git helps you:
- track project changes
- restore older versions
- recover from bad edits
- sync work to GitHub
- collaborate with other developers
- review what files changed before saving a checkpoint
Unreal Engine projects are especially risky without source control because they contain many binary files. A Blueprint, material, map, animation, or texture can break and you may not be able to manually repair it.
Brutal truth: if you are working on an Unreal project with no version control, you are gambling with your own time.
Why Use GitHub Desktop?
Git is powerful, but the command line can intimidate beginners. GitHub Desktop gives you a simpler interface for the core workflow:
- create repositories
- see changed files
- write commit messages
- push to GitHub
- discard unwanted changes
- sync project updates
You can absolutely use Git from the terminal, and advanced teams often do. But for beginners and solo Unreal developers, GitHub Desktop is a good starting point because it makes the workflow visible.
Why Git LFS Matters for Unreal Engine
Regular Git works very well for text files like C++ source code, config files, and small project files. It does not handle large binary files as efficiently.
Unreal projects often contain large binary assets such as:
- textures
- materials
- meshes
- animations
- audio files
- maps
- Blueprint assets
- Niagara systems
GitHub blocks regular Git files larger than 100 MiB, and Git LFS is the correct way to manage files beyond that limit. GitHub also explains that LFS has storage and bandwidth quotas, so you need to monitor usage as your project grows. GitHub large file limits GitHub LFS billing and quotas
Git LFS stores large file content separately while Git keeps lightweight pointer files in the repository. That keeps your repository healthier than pushing huge binaries into normal Git history.
Requirements
Before starting, you need:
- A GitHub account
- GitHub Desktop installed
- Git installed on your machine
- An Unreal Engine 5 project
- Git LFS available through your Git installation or installed separately
You can download GitHub Desktop here: GitHub Desktop
You can read Git LFS setup instructions here: Git LFS official website
Step 1: Create or Open Your Unreal Engine Project
Start by creating a new Unreal Engine project or opening an existing one.
The Git setup works for both:
- Blueprint projects
- C++ projects
In the video example, a First Person Blueprint template is used. The template does not matter. The source control setup is basically the same.
Step 2: Add the Project to GitHub Desktop
Open GitHub Desktop.
From the top menu, choose:
File > Add Local Repository
Browse to your Unreal project folder and select it.
If this is a new Unreal project, GitHub Desktop will show a warning:
This directory does not appear to be a Git repository.
That is normal. The project folder exists, but Git has not been initialized yet.
Click:
Create a repository here instead
Step 3: Create the Local Git Repository
On the Create New Repository screen, set a clear repository name.
The most important setting here is the .gitignore template.
Choose:
Git Ignore = UnrealEngine
This generates an Unreal-specific .gitignore file so temporary and generated folders do not flood your repository.
Unreal projects generate many files that should not be committed, including:
- Intermediate
- Saved
- DerivedDataCache
- temporary build files
- some generated binaries
The Unreal .gitignore template keeps your repository cleaner and avoids wasting storage on files that can be regenerated.
Click:
Create Repository
Step 4: Publish the Repository to GitHub
After creating the local repository, GitHub Desktop will begin tracking the project.
To upload it to GitHub, click:
Publish Repository
Choose whether the repository should be public or private.
For most Unreal projects, especially personal projects, private is usually safer unless you intentionally want the project public.
Once published, your project exists both locally and on GitHub.
Step 5: Understand When Regular Git Is Enough
If your Unreal project is tiny, regular Git may be enough for the beginning.
But Unreal projects usually grow quickly. Even a simple project can eventually include large assets, marketplace packs, textures, sounds, maps, animation files, and Blueprints.
The moment large binary assets become part of the project, Git LFS becomes the better choice.
Step 6: Create the .gitattributes File
In your Unreal project root folder, create a file named:
.gitattributes
Place it next to:
.gitignore
This file tells Git how to treat specific files or folders.
Git LFS can be configured either by running git lfs track commands or by directly editing the .gitattributes file. The official Git LFS setup guide confirms that repositories can be configured by selecting file types to track or directly editing .gitattributes. Git LFS getting started
Step 7: Add Text Normalization
At the top of .gitattributes, add:
# Auto detect text files and perform LF normalization
* text=auto
This helps Git handle text file line endings more consistently across operating systems.
This matters when a team works across Windows, macOS, or Linux because line endings can otherwise create noisy and useless file changes.
Step 8: Add a Git LFS Rule for Large Unreal Assets
Add a rule for the folder you want Git LFS to manage.
Example:
Content/FPWeapon/** filter=lfs diff=lfs merge=lfs -text
This tells Git to use LFS for everything inside:
Content/FPWeapon/
Replace FPWeapon with the folder name you actually want to manage through LFS.
The pattern means:
- Content/FPWeapon/** applies to everything inside that folder recursively
- filter=lfs sends matching files through Git LFS filters
- diff=lfs tells Git not to treat the binary file like normal text diff data
- merge=lfs uses LFS merge handling
- -text prevents Git from treating the file as text
This is important because Unreal assets are usually binary. Git cannot meaningfully diff a .uasset file like it can diff a .cpp or .ini file.
Recommended .gitattributes Example
A simple example for this tutorial:
# Auto detect text files and perform LF normalization
* text=auto
# Store selected Unreal asset folder in Git LFS
Content/FPWeapon/** filter=lfs diff=lfs merge=lfs -text
For a larger project, you may later track broader Unreal asset patterns with LFS, such as textures, meshes, audio, maps, and other binary files. But for beginners, starting with a specific folder is easier to understand and control.
Should You Track the Entire Content Folder with LFS?
You can track large parts of the Content folder with LFS, but do not do it blindly.
Tracking too much can increase LFS storage and bandwidth usage quickly. Tracking too little can push large binary files into normal Git.
A clean strategy is to decide which folders contain large binary assets and apply LFS rules intentionally.
For example:
- Weapon assets
- Character assets
- Animations
- Audio
- Cinematic files
- Large maps
- High-resolution textures
Be intentional. Do not turn source control into a garbage dump.
Step 9: Commit the .gitattributes File
Return to GitHub Desktop.
You should see .gitattributes as a new change.
Write a commit message such as:
Add Git LFS rules for Unreal assets
Then click:
Commit to main
After that, click:
Push Origin
Now the LFS configuration is part of your repository.
Step 10: Add a New Unreal Asset and Test Git Tracking
Open Unreal Engine and create a new Blueprint or asset inside the folder covered by your LFS rule.
Save the asset.
Then switch back to GitHub Desktop. You should see the new Unreal asset appear as a changed file.
Unreal assets are binary files, so do not expect normal readable diffs like you would get from C++ code.
Step 11: Commit and Push the New Asset
In GitHub Desktop, write a clear commit message:
Add test pickup Blueprint
Then commit and push.
Your asset is now tracked and stored through your Git workflow.
Step 12: Discard Unwanted Changes
If you accidentally create or edit a file and do not want to keep it, GitHub Desktop lets you discard the change before committing.
Right-click the changed file and choose:
Discard Changes
This is useful when you accidentally save a test Blueprint, change a setting, or generate files you do not want in the repository.
Warning: discard means discard. Do not use it casually if you are not sure. Once discarded, your local change is gone.
Step 13: Check Git LFS Usage on GitHub
To check Git LFS usage, go to GitHub in your browser and open your account settings.
Navigate to billing or plans usage, then look for Git LFS data.
GitHub currently uses quota and metered billing behavior for Git LFS storage and bandwidth. Storage and bandwidth are measured separately, and behavior after exceeding quota depends on your billing and budget settings. Always check the current GitHub documentation before relying on old quota numbers. GitHub LFS billing documentation
Best Practices for Unreal Engine and Git
- Always use an Unreal Engine .gitignore template.
- Use Git LFS for large binary assets.
- Do not use LFS for normal source code.
- Commit small, meaningful changes instead of giant chaotic commits.
- Push regularly so GitHub has your latest work.
- Check changed files before committing.
- Do not commit DerivedDataCache, Saved, Intermediate, or generated junk.
- Monitor Git LFS storage and bandwidth if your project grows.
- Keep asset folders organized so LFS rules are easier to manage.
Common Mistake: Adding LFS Too Late
If you already committed large binary files to normal Git before setting up LFS, adding .gitattributes later does not automatically rewrite your old history.
From that point forward, matching new files can use LFS, but old committed files may still exist in regular Git history.
Fixing old history requires migration tools and more careful Git work. That is why it is better to set up .gitignore and LFS early in the project.
Common Mistake: Tracking Generated Unreal Folders
Do not commit folders just because they appear in the project directory.
Unreal generates temporary and cache data that does not belong in source control. If your repository suddenly becomes massive after the first commit, your .gitignore is probably wrong or was added too late.
Use the UnrealEngine .gitignore template from the beginning.
Common Mistake: Using Git Like Cloud Storage
Git is not Dropbox. Do not treat it like a random backup folder where you dump everything.
A good Unreal Git repository should contain the project source, configs, assets that matter, and the files needed to rebuild or continue the project.
It should not contain every cache, build artifact, local settings file, or temporary generated folder.
How the Full Workflow Works
- Create or open an Unreal Engine 5 project.
- Add the project folder to GitHub Desktop.
- Create a new Git repository from GitHub Desktop.
- Select the Unreal Engine .gitignore template.
- Publish the repository to GitHub.
- Create .gitattributes next to .gitignore.
- Add text normalization and LFS rules.
- Commit and push the LFS setup.
- Create or edit assets in Unreal Engine.
- Review changes in GitHub Desktop.
- Commit and push meaningful work regularly.
- Discard unwanted changes before committing if needed.
When This Setup Is Enough
This GitHub Desktop workflow is great for:
- solo developers
- students
- small Unreal projects
- tutorial projects
- Blueprint-heavy projects
- small teams that need simple Git basics
For larger teams, you may eventually need stricter branching rules, pull requests, file locking, Perforce, Anchorpoint, or more advanced source control workflows.
Git vs Perforce for Unreal Engine
Git can work well for many Unreal projects, especially small and medium projects. But Perforce is also common in professional game studios because it handles large binary assets, file locking, and large depots very well.
For a solo developer or small learning project, GitHub Desktop plus Git LFS is usually enough.
For a large team with many artists working on binary assets at the same time, you may eventually outgrow simple Git workflows.
Conclusion
In this tutorial, you set up Git and GitHub Desktop for an Unreal Engine 5 project, used the Unreal Engine .gitignore template, added Git LFS rules with .gitattributes, committed and pushed your project, checked LFS usage, and learned how to discard unwanted changes.
This setup gives you a clean beginner-friendly source control workflow for Unreal Engine. It protects your project, keeps generated junk out of your repository, and prepares you for larger assets as your game grows.
Watch the full tutorial on YouTube: How to Set Up Git and GitHub Desktop for Unreal Engine 5 LFS Guide
Subscribe for more Unreal Engine workflow tutorials: Subscribe to Rambod on YouTube
Resources
Frequently Asked Questions
Do I need Git LFS for every Unreal Engine project?
Not always at the start, but most Unreal projects eventually include large binary assets. Setting up Git LFS early is safer than fixing a bloated repository later.
Should I commit the Intermediate and Saved folders?
No. These are generated Unreal folders and should usually be ignored by the Unreal Engine .gitignore template.
Can GitHub Desktop handle Unreal Engine projects?
Yes. GitHub Desktop works well for basic Git workflows, especially for solo developers and small projects.
What does .gitattributes do?
It tells Git how to treat specific files or folders, including whether files should use Git LFS, text normalization, diff behavior, and merge behavior.
Why not put every file in Git LFS?
Because LFS has storage and bandwidth usage. Use it for large binary assets, not normal text files or source code.
Can I discard Unreal asset changes in GitHub Desktop?
Yes, but be careful. Discarding changes removes your local edits before they are committed.
Related Tutorials
More lessons connected by category, tags, engine version, or implementation type.
Recommended resource
Recommended for this tutorial
Useful tools selected for this workflow topic.