A question about committing

(Lecture 97)
So I’ve been clearing things out in my project and I wanted to ask this simple question:

“Should we include everything in our commits?”

What I mean, is that during the past few lectures we imported a few Asset Packs, which tend to take quite a few space. In my case, the game reaches the size of 1GB, mostly because of Unity’s “Terrain Tools” (not imported in the course so far) which are responsible for half of this size. But still, 500MB of files for every commit (without even having a finished game) is still a fairly large size isn’t it?

Any guidelines as to whether it is a good practice to include all the asset packs and audio we have downloaded? Should we download them again in case of a mishap, have another repo/branch just for them, or we simply keep them in our project commits? Maybe I missed it, but Ben did not address this anywhere, plus the Unity recommended .gitignore does not reference anything about Asset Packs. I read something online about using Git Large File Storage with Unity because it uses large binary assets for a variety of reasons, but I don’t know if this is even relevant to what I am asking here.

Hi Michael,

When deciding if you should include a file/asset in a commit, ask yourself the question: Can I easily retrieve that file/asset? (For example, we do not make a commit which includes the Unity setup file.)

Secondly, what do you mean by “Terrain Tools”? Do they change each time you open Unity? If not, there is no need to have them in each commit.

Thirdly, if you are referring to the terrain data, figure out what exactly is getting committed. If the file is nothing but text, git will not include the entire file in the commit but the changes only, which might be a few kilobytes of data.

Before worrying about the size of your repository, worry about the legal aspect of a public repository because you definitely do not want to include an asset you purchased and make it public anywhere when it is prohibited.


See also:

1 Like

Hi Nina,

Thanks for your input. The Terrain Tools is an asset pack containing brushes, features and some layers: https://assetstore.unity.com/packages/2d/textures-materials/terrain-tools-sample-asset-pack-145808

I guess depending on what you said at the very beginning, some things are better not committed and yes, of course it is a big “no” to upload paid assets to a public repository. Your answer covered me completely, thanks again.

EDIT Very interesting articles the ones you shared.

I would probably include the Terrain Tools in a private repo as long as I do not change the textures every other day.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms