Shuan Chen

PhD Student in KAIST CBE

0%

GitHub License

When browsing other’s code on GitHub, we often see LICENSE file in the repostory. This is an article to simply explain why do we need LICENSE and the comparison of three popular LICENSE: GPL (General Publich Lisence), Apache and MIT. The following figure from this blog shows the difference of current popilar licenses.

image

What and Why LICENSE?

When people share codes on GitHub, these codes are public for everyone, meaning everyone can view, learn and use the codes for their purpose.

However, different projects have different restictions of how they want their codes to be used. These different retrictions are listed in the different LICENSE. In short, you can think LICENSE if pretty much similar to “the rule of using open-source codes”

Permissive and Copyleft

Permissive License

  • Freedom of Use: Permissive licenses prioritize freedom of use and distribution. They allow users to modify, distribute, and use the software as they see fit, including incorporating it into proprietary projects without the obligation to share the source code of derivative works.
  • Minimal Restrictions: These licenses impose minimal restrictions on how the software can be used and combined with other code. They provide users with maximum flexibility and freedom, making them attractive options for a wide range of projects.
  • Promotion of Innovation: Permissive licenses encourage innovation and adoption by lowering barriers to entry and allowing developers to build upon existing code without restrictive licensing requirements.
  • Examples: Apache License and MIT License are commonly chosen for their simplicity, flexibility, and broad compatibility with other projects and licenses.

Copyleft License

  • Preservation of Freedom: Copyleft licenses prioritize the preservation of the freedoms guaranteed by open source software. They ensure that derivative works of the original code remain open source and are distributed under the same terms as the original work.
  • Viral Nature: Copyleft licenses have a “viral” nature, meaning that any modifications or extensions to the original work must also be distributed under the same copyleft license. This ensures that the software remains free and open for all users.
  • Source Code Availability: Copyleft licenses often require the distribution of the source code for any modifications or extensions made to the original work, ensuring transparency and enabling further collaboration.
  • Examples: GNU General Public License (GPL) is a prominent example of a copyleft license, widely used in the open source community for projects such as the Linux kernel and the GNU operating system.

How to choose the LICENSE?

Simply speaking, here is a decision tree of the common questions when considering which LICENSE to use:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
What level of control do you want over derivative works?
Do you want derivative works to also be open source?
| |
| |__ Yes:
| | |
| | |__ GPL (GNU General Public License)
| |
| |__ No:
| |
| |__ Do you want to allow proprietary use of your code?
| |
| |__ Yes:
| | |
| | |__ MIT License
| |
| |__ No:
| |
| |__ Apache License

What happen if you do not include LISCENSE?

If you don’t include a LICENSE file in your project, it typically means that your project’s code is protected by copyright law by default, but without any explicit permissions granted to others regarding how they can use, modify, or distribute your code.

Here’s what happens if you don’t include a LICENSE file:

  • Copyright Protection: Your code is automatically protected by copyright law, meaning that others cannot use, copy, distribute, or modify your code without your permission.

  • Unclear Permissions: Without a license, it’s unclear what permissions you’re granting to others. Some potential users may hesitate to use or contribute to your project because they don’t know what they’re allowed to do with the code.

  • Legal Risks: Without a clear license, you might face legal challenges or disputes over how others are using your code. For example, if someone uses your code and distributes it without permission, you may need to take legal action to enforce your copyright.

  • Limited Collaboration: Open source projects thrive on collaboration, but without a license, potential contributors may be reluctant to contribute to your project because of the legal uncertainty surrounding the use of your code.