DEV Community

Akira Game
Akira Game

Posted on

Deal with large file in Unity Project

Introduction

I have been using Github since I became an engineer, but I had a problem with Github when I used Unity at first time. That is a large file in Unity project.
This post will show what is problem and how deal with it.

Problem

Restriction

There is the default restriction of github that player cannot upload move than 100.00MB file. However, Unity projects sometimes have move than 100.00MB like .dylib file. The result is to fail to push file.

Solution

Solution1 ~~ .gitignore ~~

By utilizing the .gitignore file, you can manage unnecessary files without uploading them to GitHub. This can also help you avoid uploading large files.

Solution2 ~~ LFS ~~

If there are still large files, you will need to use Git Large File Storage that offered by Github. It can make users to upload move than 100.00MB.

How to use LFS

1.Install LFS

In case Mac

brew install git-lfs
Enter fullscreen mode Exit fullscreen mode

2.Intall local repository

git lfs install
Enter fullscreen mode Exit fullscreen mode

3.Track Large File

git lfs track "*.dylib"
Enter fullscreen mode Exit fullscreen mode

You will be able to upload the tracked file, even it is a large.

Top comments (0)