Took Git Smart Course, Sourcetree has file size limit of 10MB, Unity Courses

After taking the Git Smart Course, I am applying it to your other Unity Courses, but Sourcetree has a file size limit issue of 10MB.

I am building games and using Sourcetree for my git backup system, but I have run into 10mb file size limit for commits with Sourcetree, but I found git file size limit is 2GB.

However I can upload to Git with GitDesktop or the Terminal without getting file size limit error.

I found in Sourcetree to change in DIFF the limit to 2048000KB (2GB) but it is still not working…

A lot of game assets (like in Complete 3D Unity Course) can be bigger than 10mb and packages that are around 1.5gb. I also had trouble with the post.buffer past 2GB, I think git disconnects after 2GB total upload which I understand, and will try to commit and push in smaller increments.

I do like to see the visual changes on branches in Sourcetree, but it is becoming unusable with the file size limit issue I keep running into. I believe the Git Smart Course could use some updated sections on how to change the file size limit for other courses you have in order to implement the use of the Sourcetree application.

Any help on fixing the file size limit in Sourcetree will be appreciated.

Sourcetree 10MB File size limit before needing Git LFS // Git Limit is 2GB

I had tried to install Git LFS and see what would happen but it just caused more issues, I had made many changes on my projects with all this file size issue, I was 4 commits deep on a couple and could not back up my games! It took 4 days of troubleshooting to figure out what I need to do to fix it. I made a local backup of my back and I found some youtube videos on how to use the ‘git rebase -i HEAD~5’ (Which is also not covered in Git Smart Course) option to squash and drop commits which combined or erased them. I erased many commits, and then copied from my back up the files i needed to restore my game without including the .git folder that keeps track of commits. Anyways, it set back my schedule a ton and it was very difficult to figure out. I know that others may not have been able to figure out what I have and I wanted to help others by making it known.

Anyone?

For my projects I added an AssetPacks folder and included it in the .gitignore. I move all asset packs to this folder. This eliminated all the large file issues. I only work by myself, so I have no team sharing concerns. Hope this helps.

1 Like

Yes I have the standard .gitignore as well, I work on my own projects too. some files are bigger than 10mb, but Sourcetree does not like it. I have been using the terminal now. I didn’t want to include the packs into the git ignore, because it would not back up the game assets. I am finding a way around Sourcetree by using the terminal.

First you’d have to set up git-lfs. Next, if source tree still does not work then we have little control over that and I would suggest command-line. I would however question committing files > 10mb as Typically that’s going to be a binary file most likely and do you really need that in a repo.

I personally would never use source-tree. it is unreliable and have made many mistakes using it in the past so started using command-line.

Okay why do they teach to use Sourcetree if it is not a good program to use?

It’s an older course (still relevant as it happens) and since then there are a number of clients out there, most of which are not free. You can use VS Code’s integrated git support which is ok. Visual Studio Community and Rider both have integrated support and there are a number of paid for clients, Git Kraken I believe is favoured by most.

Source Tree and Tortoise Git are 2 that springs to mind that are free. Tortoise Git lets you interact via windows explorer and actually puts icons against files that are modified. For that alone it is worth using.

SourceTree itself is usable. For an IDE, it works for the most part but I’ve encountered issues with it. I am quite fluent in command-line git as I use it daily from Linux at work. It isn’t difficult to learn but it is worth exploring using your preferred code editor instead. It’ll handle unity files usually.

However, I will repeat, you shouldn’t be committing large files into git or any revision control system. It’s not what they are designed for. Convenience yes, but every time you update a binary file it makes a complete copy and so the repo grows and gets slower. A 10Mb asset is beyond what I personally would consider acceptable so I would argue SourceTree did its job and stopped you.

There are a lot of game files like textures for example that are bigger than 10MB

You are right. I have textures that size in the 100’s of Mb in size. It doesn’t change the fact that game assets should not be stored in a source control system in an ideal world. There are systems out there specifically for game assets. For Indie devs, this could present as an issue but for triple-A companies, they invest in devops who look after all of this for them.

Also, every time you might update a 10Mb file, your repo grows by that much. If you do it 10 times, your Repo is over 100mb in size. If you have 10 of those files, it becomes 1Gb in size. Sites like Gitlab and Github give you less than that for free, and everything else you pay for.

most are maybe 50 or 100Mb max for free.

It’s not a SourceTree limitation, it’s a git limitation. SourceTree works perfectly fine. I have been using SourceTree for years and when I push a file over 10mb, I get the message, click ok (which will enable git lfs automatically) and continue without issues. You will find the same problem with any program that uses git.

That being said, there are several recommendations on the interwebs to not use git with Unity and rather use Plastic SCM (that is owned by Unity and now known as Unity Version Control), all of which I ignore because I am happy to use git.

1 Like

I noticed there’s even a plugin for Plastic SCM for Unreal. No plan on changing either as I don’t have the issues. It’s only when you move to production of a title you might consider something like Perforce which can handle art assets but it is expensive.

Privacy & Terms