Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
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. –  Carlos Campderrós Jul 3 '13 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 Jul 3 '13 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 Jul 3 '13 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) –  Carlos Campderrós Jul 3 '13 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 Jul 8 '13 at 18:27
show 1 more comment

1 Answer

  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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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