Skip to main content

How to create a license

Licenses are files or permissions of what others can do with our source code. Github has recently come up with a website ChooseALicense.com to help the user choose their own licenses

Steps to Create a License:

  1. On Github.com. Then go to the main page of the repository for which you want to add license.
  2. Above the list of files, click add files, and choose "create new file".

image

  1. In the file name, type "LICENSE.md" (all capital).
  2. At the right side of file name, click "choose license type"

image

  1. On the left side, you would have many license options to choose from. Pick one according to your vision.

image

  • The folllowing table shows few licenses usedin open-source:
LicenseDescriptionApplications
GNU General Public (GPL)Right to download, use, modify and, redistribute(copyleft) the code. Also the patent protection (GPL v3)Free softwares like Git, WordPress, Notepad++, Linux
MIT LicenseSimilar but no copyleft and much more flexible than GPL, not redistributed. Allows to sell code even without modificationFree softwares like .NET Core, Angular, node.js, jQuery
Apache LicenseSomewhere in between MIT and GPL licenses. Original copy must be Apache lincensed but copies can have different licenseAndroid, Apache HTTP Server, Kubernetes, Open3D Engine
BSD LicenseLow restriction type of license. Same freedoms as the MIT license. Less clear handling of patent rights compared with Apache license.Dart, Django, CMAKE, Java OpenAL
  • To know more about using various licenses or having any confusion on choosing your license, then see this video
  1. Review and click "Review and Submit" button.

image

  1. Then review your file and add a meaningful commit message

image

  • If you have multiple authors to give credit, you shall refer this article
  1. Below the commit message fields, decide whether to add your commit to the current branch or to a new branch. If your current branch is the default or main branch, you are advised to create a new branch for your commit and then create a pull request. For more information, see "Creating a new pull request"

  2. Click "Commit Changes". And then... Congratulations on creating a license for your project.