Although open source software can be freely viewed by anybody, using it -particularly as a part of proprietary software- can be a sensitive subject. Many open source developers prefer their projects only be used with appropriate author attribution and/or only by other open source software.
The “LICENSE” file in a repository is typically used to describe the licensing terms for the repository: restrictions for what circumstances it is allowed to be used.
Most developers choose to use industry standard licenses used by many other open source projects. ChooseALicense.com is a great resource that helps you compare licenses that have been read over and vetted by law. One commonly used license is the MIT license!
In the workspace, we will demonstrate how to use the MIT license for your project.
- Click the I want it simple and permissive. option for the MIT license.
- Read through the MIT license, then copy the contents of the license.
- Head back to your repository in a new browser tab or window under the URL
- Click the Add file button and then Create new file. Name the file LICENSE.md.
- Paste the contents of the MIT license from choosealicense.com/licenses/mit/ into the file, replacing year and name with this year and your name.