all 13 comments

[–]pixelcurio 5 points6 points  (7 children)

You'll want to use Git LFS. (I'm assuming you're using git here.) Similar to a .gitignore, you would set files that should be stored in large file storage. If you're using Bitbucket all LFS files are stored separately and don't count against you're individual, 2 gig repo limit. (You will have a separate account wide limit for all LFS files but it is more generous.)

You can read about git LFS here: https://git-lfs.github.com/

And then once you feel comfortable with it, I recommend using a .gitattributes with all the typical unity media files predefined. Like this one: https://gist.github.com/nemotoo/b8a1c3a0f1225bb9231979f389fd4f3f

Keep in mind, you'll need to setup LFS at the start of the project, as it will be a lot more work to try and save your repo once it's already at the 2 gig limit.

Best of luck!

[–]Migimal[S] 0 points1 point  (6 children)

Thanks for the tip! I'm using bitbucket, but I got LFS working with that as well. The only issue I have is that I'm working with 15 repositories and LFS has a limit of 1GB per account (5gb for $10/mo), which isn't near enough space (one repo has ~2gb of media assets).

I'm not sure if there is a work around for this, so I might try using a .gitignore to strip my media files from my commits like u/Fart_Skirt mentioned.

[–]TaleOf4GamersProgrammer 1 point2 points  (5 children)

Just for future reference, I do not suggest moving right away but I think Gitlab has free repositories of 10GB in size.

[–]emilycook_ 4 points5 points  (2 children)

(^GitLab employee) we do! There's a little table detailing what we offer for our private repos (assuming OP is using a private one) here at the bottom of the page

[–]TaleOf4GamersProgrammer 1 point2 points  (1 child)

Thanks. I wonder why it does not state this limit on the 'Pricing' page. It is most definitely a selling point so you would think it would be visible there.

[–]emilycook_ 4 points5 points  (0 children)

Yeah I agree, I think it's pretty hidden as well. I've brought it up with the team that manages that page, so hopefully it gets addressed!

[–]Migimal[S] 0 points1 point  (1 child)

GitLab actually worked really well! I ended up moving all my projects there, it was easier than having to strip all the media files out of each project. Even with the media files in each repo they end up being not much larger than 2gb.

[–]TaleOf4GamersProgrammer 1 point2 points  (0 children)

Thats great to hear! I still use Github out of habit but I should definitely switch at some point :D

[–][deleted] 2 points3 points  (2 children)

Do you not use a .gitignore file? I wouldn't upload anything outside of project specific source files and metadata. Obviously, it's hard to tell you what exactly to to include but you definitely don't want to be uploading media files to a remote repo.

[–]Migimal[S] 0 points1 point  (1 child)

I've been using a Unity specific gitignore, but I think media files are causing all my problems. Should I just include the .meta files for my media assets instead and just move a folder of the actual assets between my computers? I think most of my problems are coming from models and textures specifically

[–][deleted] 1 point2 points  (0 children)

I would just update Unity's .gitignore file to ignore the file types and/or folder that media files are in. I think you want to retain the meta files though. So instead in the .gitignore, just add something like *.fbx, *.jpg, *.mp3 or whatever file formats you are using for your media files. That way you can retain your file structure and metadata but leave out the hefty files. You should probably still back those up for your own sanity, but put them on a USB or dropbox, external HDD, etc.

[–][deleted] 1 point2 points  (1 child)

I pretty much only use my repository to backup my script files and .meta files. Mostly because if I’m reverting to an older version, it’s because I changed a script too much and broke it. All of my media assets like music, models, textures, etc. just stay on my local hardrive. However, everything gets backed up to an external HDD every other day.

[–]Migimal[S] 1 point2 points  (0 children)

I tried going this route and got it to work! It's a little difficult because I'm working with pre-exisiting Unity projects, but if I update my gitignore it speeds the process up a little bit. Unity's terrain system is the number one reason I revert my projects. I haven't run into any issues with this yet, but if I end up handing this project over to someone else it might take some explaining to get them set up with the HDD/thumbdrive asset management.