In my project, I have copied and used code from two other projects, one of which is licensed under GPLv3 and the other one has an MIT license.

Which license should I use for my project?


1 Answer 1


Because your project includes GPLv3 code, you can only publish your project if you offer it under the GPLv3 license. The relevant part of the GPLv3 is in section 5:

You may convey a work based on the Program, […] provided that you also meet all of these conditions:

  • a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
  • b) The work must carry prominent notices stating that it is released under this License […].
  • c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.

In contrast, the MIT license has no comparable requirement. It only requires that you attribute the original project appropriately:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

When you inherit the GPLv3 license from the other project, you do have a couple of extra points to consider:

  • Was the original project licensed under the GPLv3 or the GPLv3 “or any later version” (GPLv3+)? If later versions are allowed you have the choice of keeping it that way, or only allowing the GPLv3.
  • If the GPLv3 was augmented with extra permissions (see section 7) you may remove them, at your choice.
  • If the GPLv3 was augmented to require certain notices to be preserved, you must do so.
  • While your project as whole must be available under the GPLv3, specific parts of it may be under a more permissive license (e.g. parts that you wrote entirely by yourself or parts that are under the MIT). If you want to keep it this way, it is best to track the licensing status on a file by file basis (e.g. by a license comment in the file header). If you accept outside contributions, make it clear that individual files have a more permissive license. I would also note this in a LICENSE file.

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.