13

Suppose I have a private project with 100 commits. I don't add a software license until the 101st commit. If I make the project open source, does that mean all first 100 commits are unbound by the software license in the 101st commit?

Should the project be rebased when a license is added?

2 Answers 2

16

The licence applies when you publish the work. So if you publish after the commit then it covers all of the commits.

If you publish before you add the licence, then there is no licence for anyone to use your copywrited work until you publish a version under a licence of some kind.

The problem you are thinking of occurs when a project is published under one licence and then changes to another.

In that case people who have downloaded the work under the old licence are still on that licence. With open source licences this often means they can republish the work under the same licence.

3
  • 1
    Good answer. Does publishing include the uploading of commits to an open source repository where it can be accessed by others?
    – marstato
    May 27, 2018 at 4:24
  • 3
    @marstato: Yes. Uploading to a publicly accessible repository is one form of publishing. May 27, 2018 at 7:04
  • Strictly speaking, the license doesn't cover all the commits, it covers the exact content that was published. If I commit and then remove a chunk of code before publishing, it's not covered. But +1, because this is the correct answer. May 27, 2018 at 12:28
4

You are correct that the license is valid from the time it is applied. That means that the previous commits are defaulting to copyright which means no one has the right to use them for any purpose.

If it is important to you that others can use the old versions you could rebase.

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.