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:
- On Github.com. Then go to the main page of the repository for which you want to add license.
- Above the list of files, click add files, and choose "create new file".
- In the file name, type "LICENSE.md" (all capital).
- At the right side of file name, click "choose license type"
- On the left side, you would have many license options to choose from. Pick one according to your vision.
- The folllowing table shows few licenses usedin open-source:
License | Description | Applications |
---|---|---|
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 License | Similar but no copyleft and much more flexible than GPL, not redistributed. Allows to sell code even without modification | Free softwares like .NET Core, Angular, node.js, jQuery |
Apache License | Somewhere in between MIT and GPL licenses. Original copy must be Apache lincensed but copies can have different license | Android, Apache HTTP Server, Kubernetes, Open3D Engine |
BSD License | Low 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
- Review and click "Review and Submit" button.
- Then review your file and add a meaningful commit message
- If you have multiple authors to give credit, you shall refer this article
-
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"
-
Click "Commit Changes". And then... Congratulations on creating a license for your project.