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

Kotlin Design Patterns Made Easy | Creational Patterns

Daily progress: Elevator challenge

Performance Vs Scalability

Challenges To Writing Cloud Native Applications: The Followup

Basics of using CSS Flexbox — Part 1

Efficient Spring Data REST development

COMPILATION STEPS

Spring Data R2DBC - Transactions

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

Cross-Platform Input Controller!

The hidden powers of CSS…

Zoo Cards as Scriptable Objects

4 Ways of Playing Animation-Related Sounds in Unity