How To Set Up Git LFS Into Your Unity Project

GitHub allows you to store your backups in your own public/private repositories within their servers. But there is a limit to the size of the files that you are storing.

If you are needing to backup your project, but you are getting a git LFS error like this when you try…

Then you should probably use Git LFS!

Initializing Git LFS into your active project is easy!

To start, make sure that you have “Git Bash” installed. If you don’t, you can click the link below and follow along with me in an article I did on how to install Git.

Once you have “Git Bash” installed, simply go to your project folder on your computer. Right-click and select “Git Bash Here”.

Next, simply type the command below into GitBash and press enter.

git lfs install

Now, Git LFS should be initialized on your project. But it won’t track all the different file types on its own. So in order to gain access to making these changes, you’ll need to add a “.gitattributes” file.

To do this, you will need to type the command seen below into Git Bash in the same location that you should still be in from your last entered command, then press enter.

git lfs track “*.psd”

Once this is done, you should see a newly created .gitattributes file within your project files.

Open the “.gitattributes file” and replace the contents of the file with the contents in this link:

https://gist.github.com/Srfigie/77b5c15bc5eb61733a74d34d10b3ed87

Save it, and you should now be able to commit your project to GitHub!

Hi, my name is Adam Reed and I am a software engineer specializing in Unity and C# development. Feel free to scroll through and check out some of my work!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Google Certified Associate Android Developer: Tips, FAQs & my journey

SQL Injection with GO and Fix

Everything on Solidity Blockchain Development

How to develop a taxi booking app like Uber

180 Websites in 180 Days: Day 22

BeGlobalDAO. Launching, migration and plans [English — Work in progress]

How to properly play Wordle using Dataflow and BigQuery.

Angular Build Upload to AWS S3 + Cloudfront

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Reed

Adam Reed

Hi, my name is Adam Reed and I am a software engineer specializing in Unity and C# development. Feel free to scroll through and check out some of my work!

More from Medium

OnCollisionEnter Vs. OnTriggerEnter — When to use them?

Git, the Developers Playbook

Journal 126 — Unity App Development Setup Part 7 UI Manager and Scripting

Local control for Player