7

I've been working on a personal closed source project for some time and would like to make it open source. I've never created my own open source project before so it will be a good learning experience. I have been using GitHub as source control, so once I've written some decent docs on how to use and develop for it etc, it should be as simple as switching the repo to be public right?

I guess my main question is around licencing. I was thinking of going with Apache 2.0 licence just because it seems to be widely used. It requires the licence header to be attached to all the source files, but if I do that now then all the other commits in the past will have it missing. Does that mean some one could pull an earlier version and it wouldn't have a licence? Is it best to start a new repo with the initial commit containing all the code with licence headers? Or maybe is there some advanced Git functionality that allows me to apply the licence header to all existing commits some how?

Cheers.

6
  • 1
    remember to not commit/publish config files with users/passwords/sensitive information. I would not use license headers in any file, but rather have a LICENSE file in the root of the project. Commented Jul 3, 2013 at 13:37
  • @Tom You seems concerned that not having license headers in your previous commits will be a problem -- do you plan to add LICENSE files to your previous commits? If not, your previous commits functionally will not be Apache-licensed. Creating a new repo is certainly the clearest way to indicate the chronological point when development switched from no-license to Apache. If you didn't create a new repo, the turnover point would still exist, but might not be obvious to users.
    – apsillers
    Commented Jul 3, 2013 at 14:17
  • Thanks. I was under the impression that adding the licence headers was a requirement. So would it be ok to just commit a LICENCE file. I guess I would be able to apply it to the existing commits with a rebase maybe? Then all the code in all the commits would be under licence.
    – Tom
    Commented Jul 3, 2013 at 15:06
  • 1
    You maybe could use the trick explained in stackoverflow.com/questions/2719579/… to a LICENSE file in the initial commit of the repo (not tested by me) Commented Jul 3, 2013 at 15:29
  • @Tom I don't think the Apache license requires headers; the Apache foundation strongly recommends them. I assume this is not recommended to comply with their license, but to comply as fully as possible with many countries' licensing laws. Apache says, "Each original source document... SHOULD include a short license header at the top," and the IETF defines "SHOULD" as "there may exist valid reasons... to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course."
    – apsillers
    Commented Jul 8, 2013 at 18:27

1 Answer 1

3
  1. Well you seem to want to use the Apache licence because it's the most common one.

I was thinking of going with Apache 2.0 licence just because it seems to be widely used

This Coding Horror Post explains in a clear and concise fashion the different licences available.

  1. If you create a new branch and commit to it, it's cleaner. unless you want the older version(s) available to your users.

Your Answer

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

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