Handling Large Files: Git LFS
Git is great for text (like code or markdown), but it struggles with large binary files. Every time you update a high-res image, PDF document or audio file, Git saves a completely new copy, which can quickly bloat the repository.
To solve this, we use Git LFS (Large File Storage). It replaces the heavy files in your repository with a reference to a remote location, while storing the actual file contents on GitHub’s servers.
Setting Up LFS for a New File Type
GitHub Desktop handles all the heavy lifting behind the scenes, but if you introduce a brand-new file format to the project (for example, Photoshop documents .psd), you need to tell Git to track it.
Because GitHub Desktop runs on top of standard Git, the cleanest way to register a new format is a quick one-time terminal command inside your project folder:
git lfs track "*.psd"
This command creates or updates a hidden configuration file in your main directory called .gitattributes.
Guaranteeing it Works in GitHub Desktop
For GitHub Desktop to manage your large files, it requires that .gitattributes file. To ensure everything works smoothly, follow these rules:
-
Commit the Attributes File First: Whenever you track a new file type, GitHub Desktop will show that
.gitattributeshas been modified. Always commit and push this change to GitHub before adding your large files. -
Add Your Files Normally: Once the file extension is registered in
.gitattributes, you don’t have to do anything special. Just drop your large images or assets into your project folders. -
Verify in GitHub Desktop: When you open GitHub Desktop, look at the changed files list. You can proceed with your standard workflow (Staging → Committing → Pushing). The app will automatically read the attributes file, recognize the extension, convert the file to an LFS pointer, and upload the heavy asset in the background.
Caution
Note on Unreal Assets: Because
.uassetand.umapfiles are binary, Git cannot merge them. If two people edit the same Blueprint or Level at the same time, one person’s work will overwrite the other’s. Always communicate with the team before modifying core assets!