Can The Owner Change A Github Repository From Public To Private At Any Time?
<p>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.</p>

<p>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?</p>

<p>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.</p>

<p>Posting your code publicly on Github <strong>does not make it</strong> "open-source, totally free". </p>

<p>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.</p>

<p>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 <a href="https://www.gnu.org/licenses/gpl-3.0.en.html" rel="nofollow noreferrer">Gnu GPL</a> 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, <a href="https://www.gnu.org/licenses/gpl-faq.html#CanIDemandACopy" rel="nofollow noreferrer">this FAQ</a> is very clear that you aren't forced to distribute your software.)</p>

<p>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.</p>

<p>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 <a href="https://opensource.org/licenses/MIT" rel="nofollow noreferrer">MIT license</a> 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.</p>

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

contract-law software open-source-software