Do you push your models, sounds and other files to git?

I was just reading on bitbucket about how it’s sort of expected you only push code. But I have generally been pushing my entire unity project minus some things in .gitignore, but pretty much my entire assets folder I have been pushing to git, models, textures, sounds and all.

This made me wonder, does anyone else do this differently? Like do you only push your Scripts folder to git, but then sync your models and textures through other means? Or something else? Or does everyone just push their whole project to git?

1 Like

Nope - our entire Unity project is under version control, anything else would be madness in my mind. The only downside is you can’t diff binary files. Not a huge deal for assets but sort of a bummer for scenes.

We don’t use git, we use subversion instead. We commit everything in the ProjectSettings and Assets folder. Everything else are intermediate files regenerated by Unity.

1 Like

Version control would be pretty pointless if you didn’t push your assets up as well.

So yes push everything. There are some git ignore file templates for Unity which you can download so you don’t push the library and other folders which don’t need to be pushed. Just make sure all the .meta files are being checked in as well.

When in doubt, make a backup. Delete the entire project folder, and restore from Git, then see if the game runs correctly.

I push all of my assets up. I’m in agreement that you’d be mad not to, unless you have stuff that’s so huge as to cause issues.

And as long as you stay within the storage limits of whatever service you’re using surely they wouldn’t really have an issue what format of data you’re putting in it? I know that version control systems are more efficient with some types of data than others, but surely that’s our issue rather than theirs.

I push all assets, too, with force text, and a fairly lengthy .gitattributes to overtly specify what’s binary and what’s text.

This blog post has some good thoughts on version control, including “force text”-like options for Unity Free: Thoughts and code: Unity and version control