corazza
corazza

Reputation: 32374

Is it OK to have the source of my game on Git?

By "source", I mean everything, the audio, the models, textures, the actual code and so on. I mainly want to use git so I can develop the game with my friends, and I'm using the free version of Git, but I intended for the game to be open-source anyway. Will there be a problem if the actual game content gets to a few gigabytes? Will I have to somehow exclude it from the repo and share it in another fashion at some point?

EDIT: I'm talking both about the actual cli software called Git, and the service called Github, which seem to go together. I plan to use git locally, and then push it to Github for my friends to download.

Upvotes: 0

Views: 924

Answers (4)

GoZoner
GoZoner

Reputation: 70215

Regarding large files, there are several options. One good one is to have two repositories on GitHub; one for the large 'imagy' files and one for the rest of the source. Make the 'imagy' repository a submodule of the source repository. Since the 'imagy' repository should change infrequently you won't be impacted in day to day use.

Upvotes: 1

Michael Borgwardt
Michael Borgwardt

Reputation: 346465

On the Github side, they say this about space:

Why don’t I see any disk space limits?

GitHub does not have any hard storage limits. We have soft limits for each plan to prevent abuse. We find almost everyone uses a small fraction of this limit. If you find yourself needing more disk space for a legitimate use, please contact us.

They've been know to be pretty lenient with true open source projects running on free accounts, even back when there were explicit limits. You should probably ask before dumping gigabytes of assets into a free account though.

Upvotes: 1

Aleš Kotnik
Aleš Kotnik

Reputation: 2724

Puting all the images, textures and sounds to git repository is not a good idea because each version of a file is storred as a separate object (and not as a difference to some previous version) in repository and git is optimised to track slowly changing text (source code) files and this is what it really shines at. I you expect to have may resources I suggest, you put them in a separate archive.

Upvotes: 2

Romain
Romain

Reputation: 12819

Git is efficient for working with large histories, but could be inefficient in dealing with large files. Also, you'll have somewhat limited benefits from storing (large) binary files in Git. That being said, if your images, sounds, textures, ... aren't too big, you should be OK to have them managed in Git.

You might also want to separate your "assets" (images, sounds, textures, ... stuff that's not source code) into a separate git repository (included as a submodule in your source code repository), so that the later doesn't get too clunky.

Upvotes: 3

Related Questions