I have previously written a lot of code that is hosted on a public repo on GitHub, but it never had a license. It was written as part of my work while working for a non-commercial academic entity, and I would like to add a license before the link to the repo will be included in something that will be made public, potentially attracting one or two visitors.
This leaves me with a couple of questions:
- Can I just add a license after the fact and it will be valid for all prior work?
- Do I have to make sure the license is included in all branches of the repo, or does this not matter? There are for instance a couple of branches that are used to freeze the state of code at a certain time for reproducibility’s sake (I know this could be solved in a better way, but that’s how it is).
- I have myself reused some of the code in my current work for a commercial entity (internal analysis work, only distributed within the organization). Should this influence the type of license I choose? I am considering a GPL-license, but should I go with (what I believe to be) a more permissive license like MIT because of this?
Is that true if you leave in the license the “or (at your option) any later version” text regarding what version youre using? I understood that to mean that even if i accept contributions then my licensing clearly defines it as GPL-3 or later version so I’m able to relicense to a future GPL-4 if i wanted. Or would i still need to get any contributors agreement to relicense?
That’s a good question. I believe there is official text for “GPL-3 or later” that you can use, which should (I just asked the wife to be sure) then let you re-license the project to GPL-4 later. This is probably possible because the “or later” portion of the license text includes consent by contributors for the future change.