20

If I have put my code in one of the online repositories and have made it public but haven't licensed it... (to which the policy is that you retain the copyright).

Is it enough to just commit a licence text file along with the license header in every source file, in order to "license" the project? Or do I have to create a new project which has those from the very beginning, in which case what should I do with the old one?

4
  • possible duplicate of How can a project be relicensed?
    – Philipp
    Jun 30, 2015 at 11:31
  • Well the answers are similar however the original question was not concerned with relicensing but with licensing something which was never licensed before... Jun 30, 2015 at 11:51
  • 1
    You can't re-license something that isn't licensed. I think there is a crucial difference between the two questions that demonstrate they are separate. It could be argued that this question as out of scope though, as the answers are equally valid for licensing under a propriety license.
    – Martijn
    Jun 30, 2015 at 11:56
  • @Martijn Good point. Your input would be appreciated at this meta discussion. Jun 30, 2015 at 12:39

2 Answers 2

19

As long as you are the only contributor to a codebase, you can switch the license as you like. So yes, you can change the license, as long as you didn't use code of others. Check the answers to this question about relicensing, if you want to know under which circumstances you can change the license. Basically the same applies here, as you practically you change from an implicit copyright (license without giving any permissions) to an explicit license.

3
  • 4
    It might be worth pointing out that when people already received the software under license A and then the project switches to license B, anyone who downloaded a version while it was still under license A can still use, modify and redistribute that older version under the terms of license A. Open source licenses usually contain no clause which allows to revoke a license.
    – Philipp
    Jun 24, 2015 at 10:42
  • @Philipp Hmm, good point, I guess that would would mainly be a 'problem' if the project goes from a less strict to a more strict license and not so much the other way around...? Jun 24, 2015 at 13:08
  • 2
    @G.Rassovsky Indeed. There are numerous projects which did the switch to a stricter license and are now "haunted" by forks based on the last version released under the old license. But it can also be a problem when someone wants to create a fork based on an older version which was never officially released under the new license.
    – Philipp
    Jun 24, 2015 at 13:12
12

A common misunderstanding is that if you put something online without a license text to accompany it, anyone is free to do with it whatever they want. This isn't true.

Whatever you create is copyrighted to you, and can't be re-used without receiving a license from you allowing them to do so. Claims like "all rights reserved", icons like ©, etc. don't mean much: they are all already implied for anything that doesn't have additional license terms.

So where many think that if something doesn't come with a license you may pretty much do anything with it, the truth it that if something doesn't come with a license you may pretty much do nothing with it.

Of things you own the copyright on, you can do pretty much whatever you want. You may release it under an additional license, or you may stop distributing it under some license - though many (all?) open source license don't allow you to revoke a license. That means people who already obtained the software under those licenses retain the right to use it under such a license.

Long story short, it is generally enough to just add a licence text file, and add a license header in every file the license applies to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.