I am considering the creation of a fork to a small project licensed under GPLv2, and I have some very specific questions I did not manage to answer in my research on various sites and forums.

When I fork the code, I am forced to release the new project under the same license (GPL) as I will do, but could I also decide to release it under a dual license, one of them commercial?

When forking the project, do I automatically own the copyright of the whole thing? This is relevant when, for example, deciding a future change in the license, or to be able to enforce the GPL license to a 3rd party

  • 11
    if this were possible, anyone could simply fork a GPL project and get the same software with a brand new license effectively removing any GPL-related limitations and nullify the GPL license with one simple move. Mar 29, 2014 at 12:48
  • The GPL does allow commercial use!
    – feklee
    Aug 27, 2018 at 9:16

3 Answers 3


The short answer: When you fork an existing project, you generally do not have permission to change the license nor do you get copyright on the code you copied over.

You do have the copyright on any (nontrivial) modifications or additions that you make.

The long answer:

The only ways to get copyright on a piece of code is by writing it yourself or by contractually getting the copyright assigned to you. This means that forking an existing project doesn't change the copyrights on the code of either the original project or the fork.

The only people who can change a copyright license are the holders of that copyright. If there are multiple copyright holders to the code of a project, then all copyright holders must agree to a change in the copyright license. This means that you don't have permission to change the license of your fork (not even to dual license it), unless the existing copyright license explicitly gives you the right to sublicense the code.

  • 2
    Good explanation of the copyright issues. Mar 28, 2014 at 9:25
  • 2
    @ArtB, not sure about GPL -> AGPL, but the LGPL specifically allows you to release a modified version under GPL (see article 2). What you're allowed to do really depends on what the initial licence is.
    – Bruno
    Mar 28, 2014 at 16:28
  • 3
    @2rs2ts not sure what you say is true (see section 13 of the GPLv3... of course it depends if we're talking GPLv2 or GPLv3). In addition, your changes are generally always yours. If you add a magic widget to GPL project A, you may indeed have to redistribute the lot under GPL, but if you add the same magic widget to BSD project B, you could re-licence your stuff (and not stuff from project A) any way you'd like (compatible with project B's licence). (As always, get legal advice if you want to be sure. This is not it.)
    – Bruno
    Mar 28, 2014 at 16:35
  • 1
    Keep in mind that AFAIK (but IANAL) your code is yours no matter what, i.e. you could release a patch under any license you like, regardless of the license of the target project.
    – o0'.
    Mar 28, 2014 at 23:38
  • 4
    @Lohoris: You are right that you could release patches you write with whatever license you want. But if careless selection of that license can make the patched code non-distributable because it would be impossible to meet all license requirements. Mar 29, 2014 at 8:10

Your forked project is a derivative of the original project's code. In other words, your project is using the original project, and thus you are bound by its license. If this were not true, a license would have no point at all.

So, no, you can't release code under a proprietary license if it is derived from code that doesn't allow that.

  • Bart's answer implies stricter conditions than yours on licensing requirements of forked code - which one is accurate in the general case?
    – Thomas
    Mar 28, 2014 at 14:19
  • Your answer makes a forked project derived work, which makes it possible to relicense if the original code was under a license which allows relicensing derived works. Bart's answer says you can never relicense forked code unless you acquire copyright, no matter what the original license says. Are these equivalent?
    – Thomas
    Mar 28, 2014 at 14:25
  • 4
    @Thomas Dan's are correct, if the original license allows for relicensing then you can relicense the new project. I am not convinced that Bart's answer states what you interpret it to. OP talks about code licensed under GPL so the two are equivalent in this case.
    – Taemyr
    Mar 28, 2014 at 14:30
  • 5
    @Thomas, I don't think there is a conflict there. The point of both of our answers is that you continue to be bound by the license of the code you forked from. However, you can do whatever that code's license permits you to do. Bart notes that, if the original work's license gives you permission, you can issue your work under another license.
    – user82096
    Mar 28, 2014 at 14:30
  • @Taemyr Yes, I guess I was confused as to whether Bart's answer applied to all licenses (as the writing suggests) or only to GPL (as this question suggests).
    – Thomas
    Mar 28, 2014 at 14:33

Forget about the GPL for a moment, and look at copyright. When you fork a project, all code that was present in the original project is copyright of whoever wrote that code in the original project. All code that you write afterwards is your copyright. So unless you re-write all the code from the original project, that code isn't yours and you have no legal rights.

Next you look at the GPL license, and check what rights it gives you beyond the rights of copyright law. It allows you to create derivative works which makes the whole forking business legal in the first place - with plain copyright law, you wouldn't be allowed to create a derivative work. Next, it allows you to use the code as long as you don't distribute it. So as long as nobody else can lay their hands on the forked code, GPL allows you to do what you want with it.

However, if you distribute the forked code, including someone else's copyrighted code, you only have the permission of the copyright holder if you follow their rules. One rule is that you must license the whole code under the GPL (including your own). Another rule is that you must give the source code to others; check the GPL for details.

Changing the license would be difficult, as long as any of the original code is still there. You cannot license your code in a way that prevents the next guy from using the code in the way that GPL allowed, you also can't allow them to do things with the code that GPL doesn't allow.

  • 1
    I generally agree with you answer, but I think you might want to rephrase this sentence: "with plain copyright law, you wouldn't be allowed to create a derivative work." As a generally rule, it's probably enough to pretend that is accurate, but there are exceptions. (Lapsed copyrights, parody, etc) Though, I admit that most are not applicable to the GPL.
    – Patrick M
    Mar 29, 2014 at 5:55

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.