Ask coding questions

← Back to all posts
Git Unity Pushing to Repo
darkdarcool (132)

Hi!

Yes, another Unity question. I'm sorry. But this is with git.

My git repo is here and it was the repo for my unity project. But, when I finished coding on the project for the day and I tried to push to git, it gave me this message:

remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 553b616f34149b58aebbafa351130e33b78090efa279b4e35536597dde84c83e
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Library/il2cpp_cache/linkresult_50E6073DA7A0C6C93C62C4A9EFFEB31C/build.bc is 107.52 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/darkdarcool/Climber-Game
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/darkdarcool/Climber-Game'

And I tried Git LFS or the file over and over again. And it said it was tracking the file, but it never changed anything thing.

Is there something I can do to make this work? Or do I just have to live with no repository?

Comments
hotnewtop
Coder100 (18187)

you can use git lfs.
I use this thing: https://thoughtbot.com/blog/how-to-git-with-unity

why does this exist? To prevent abusers, git commits have a limit to the size of files, so sometimes things like fonts and images don't work.

Also for two seconds: I made a github repo????

darkdarcool (132)

@Coder100 it didn't work. It's giving me the same error

Coder100 (18187)

did you add the .gitattributse and the .gitignore @darkdarcool

Coder100 (18187)

did you also add the .gitignore?
The error clearly stated some files that are not supposed to even be in your project. @darkdarcool

Coder100 (18187)

yeah make sure you initiated the github repo in the correct place lol @darkdarcool

SixBeeps (5221)

Is there any reason why you're not using Unity Collab? I've found it much nicer to work with compared to Git, although it has less features to work with.

darkdarcool (132)

@SixBeeps
No. I just never have anyone to work with so I don’t see the point, but should I?

SixBeeps (5221)

@darkdarcool I've used Collab for tons of solo projects. Despite its name, it's the best option IMO for version control in Unity if you plan on working on your own. This is largely due to editor integration, but it's also super simple to set up.

darkdarcool (132)

@SixBeeps
Ok, but how will this help with my got problem?

SixBeeps (5221)

@darkdarcool Collab has no restriction on file size, so you won't have to deal with Git LFS

darkdarcool (132)

@SixBeeps
Oh ok, I’ll try that tomorrow

darkdarcool (132)

@SixBeeps
how will pushing to git be different when I use unity collab?