Licenses on GitHub for open source projects

Kushank Sriraj
November, 2020

I have always tried to skip the section 'Choose a license' while creating a repository on Github. Well, that doesn't count under best practices. Not anymore.

It's not very important to put a license if you wish to create a private repo. However, if your repo is public (in most cases, it is), understanding the license part will definitely give you an upper edge in the open-source community.

Why licenses in softwares?

Softwares are generally classified into two groups: proprietary and open-source. And to protect the copyright of the individual/company who wrote it, licenses are needed.

Proprietary softwares have licenses that are legally complex. Therefore, we will learn about licenses that are mostly used in open-source softwares only.

MIT License

This is the most popular license used for open-source projects.

Under this licence, the person having a copy of this software (or simply your public repo) gets the rights to use, copy, modify, merge, publish, distribute, sublicense, and sell it's copies. Yeah, all of them!

The author or the copyright holder (meaning you if you have a public repo) is not liable for any claim or damages that could possibly occur from the software. The idea is to protect the author from any damages whatsoever.

The only requirement for this licence is that the copyright notice and permission notice given in the license should be included in all the copies of the software. This is done by putting the license in the License.txt file and keeping it in the root of the project.

APACHE License v2.0

This license grants the author a patent on his software. Other than that, it's mostly similar to MIT license.

The license states : "... software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."

Hence, the author is not liable for any damages.

It is required to put the license in every copy of the software.

GNU General Public License v3.0 (GPLv3)

It states that: "Source code must be made available when the software is distributed."

Further, If a person modifies the software, (s)he has to indicate changes made to the code.

Similar to the other two, this licence also frees the author from any liability or damages inflicted by using the software.

Interestingly, you can use this license for commercial purposes also. But, even then you have to keep the whole code base open-sourced.


Well that's all you need to know about licenses while working with open-source projects.

I recommend adding the MIT license to one of your public repo. You know, follow best practices!

I appreciate your patience for reading this relatively boring piece. Hats off to you!

Now I've gotta code.

console.log("Bye..");

process.exit(0);