Open In App

How to Add Licensing to Your Open Source Project on GitHub?

Last Updated : 08 Nov, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

OpenSource licensing is about the legal authorities of the project owner and contributors. An open source project means the project’s code, documentation, and other resources are available publicly and people add value to it as contributions with code and non-code. The open source project must consist of licenses and there are different licenses available such as MIT, GNU, Apache, and others. You can explore more about open source licenses with these two well-written articles Licenses of Softwares and How to Choose the Right Open Source License.

Github Opensource Licensing

As a developer, you should know about Git and GitHub, while creating a repository on GitHub it asks for a license generally we don’t care about it because we create a common project repository, not an open-source project. Open source always consists of a particular license. Now there are two or more ways in which we can add the license to opensource a project on GitHub and we will discuss both of them in the following section. 

How to Add Licensing to OpenSource Project

On GitHub, while creating a repository it will ask for particular licensing and before selecting a license for the project it’s highly recommended to read the documentation of the license.

Opensource Licensing list

 

Method 1: Before creating a project

  • Step 1: Mentioned the name of the repo.
  • Step 2: Write a description of the project.
  • Step 3: Choose public for open source projects.
  • Step 4: Add readme to it, if you already have then ignore this step.
  • Step 5: Initialize the gitignore file.
  • Step 6: Select appropriate licensing for your open source project.
  • Step 7: Click on create a repository and finish. 

Method 2: After creating a project

Somehow you create a project and forget to select Licencing to it then how you can add the license to it? so, there are other ways in which you can add licensing to the project and you have to follow the below steps to do it. 

Step 1: Navigate to your GitHub repository and select add file and create a new file.

 

Step 2: After selecting a new file give a name to it as License.md 

 

Step 3: Now on the right-hand side select choose license template.

 

Step 4: Now select the appropriate license for your project.

 

Step 5: After selecting the license click the review and submit button. 

 

Step 6: It will review and your license file looks like this. 

 

Step 7: Now commit the file and add it to the project.

 

Step 8: License successfully added to your project.

 

Step 9: Now your license file is successfully added to your open source project.

Here we have done with open-source project licensing and ways to add licensing to the open-source project with step by step. 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads