I'm building a browser game. Eventually I want to put ads on it, sell in-game currency, build a private company around it, etc.

I want to save my code in a Github repository. As far as Github controls go it seems like you can begin a repository as public and then switch it to private at any time (that is if you have a premium account or it's your first private repo for a free account). It seems a bit weird to me that someone could say something is open-source, totally free, have a bunch of random people work on it, and then all of the sudden that one person runs off with the finished game. What are the legal things to consider here, and do I need to begin my repo as private?

I normally use GNU GPL-3.0 license for open source projects, but I'm also curious if the answer would be different for other popular licenses like Apache 2.0 or MIT. I'm locally in the New York City, USA area. Thanks.

  • 1
    A great example of this is the vote counting service we use for elections here on Stack Exchange. OpenSTV, as it was called back then, was a completely free program, and you can still get the really old, unmaintained source code for it under its original GPL. However, at some point around 2011 they switched to a monetized model where newer versions cost money to use. While they can't retract the license on the old version, they can (and did) publish the new version without that same license.
    – animuson
    Apr 12, 2017 at 0:47

2 Answers 2


Posting your code publicly on Github does not make it "open-source, totally free".

The owner of the repository decides what, if any, licence to grant regarding the copying and use of the code they have created. Each contributor (including the repository owner) have copyright their own code and are bound by whatever licence terms the owner of the repository decided was a condition of participation in the repository.


Just because you've been offering software to the public up until now doesn't mean you have to continue. (There's exceptions here, of course; the Gnu GPL requires you to offer source code for at least three years after releasing a binary, if you take the "written offer" route.) If there are no contractual or license limitations, you can stop whenever you want. (In the case of the GPL, this FAQ is very clear that you aren't forced to distribute your software.)

This doesn't mean you're depriving anyone of anything but a convenient Github site. Anything you've distributed under an open source license remains under that license. Presumably any contributors kept their own copies of the software, and they're free to do anything with them compatible with the license, including forking your project.

You can certainly take your project private regardless of license. This includes all contributions from others. Whether you can reissue it in closed-source form depends on the license. The MIT license permits that, the GPL doesn't. Either license allows you to keep the finished code private, but if it's under the GPL you can't release a version except under the GPL. If you're the sole copyright holder, you can change the license for any future version, but if you have outside contributions you can't without either their permission or a copyright assignment.

Starting your repo as public or private is irrelevant, and you can change between them as much as Github itself will allow.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .