An Interest In:
Web News this Week
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
August 26, 2021 09:42 am GMT
Original Link: https://dev.to/avneesh0612/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-3mg4
How to add a license to a GitHub repository in less than 2 minutes
Introduction
You should add a license to your open-source projects for making it easier for people to contribute and many hackathons like the ones organized by Hashnode need a license.
Adding the license
Go to the repository you want to add the license to and click on Add file
Now click on Create new file. You will be directed to a page like this
- Type License as the name of the file and you should see Choose a license template button in the left corner.
- Now choose any License you need from the options given.
MIT is one of the most famous licenses, So I am gonna choose that
You can add the two details you are asked for there.
- You can either create a new branch and commit the file but I am going to commit it directly to the main branch for simplicity.
You have added a license to your repository .
Now you can add it to your Readme as well. Here is a sample of how it is added in many repositories -
## LicenseCopyright 2021 [Avneesh Agarwal](https://github.com/avneesh0612). <br />This project is [MIT](https://github.com/avneesh0612/next-progress-bar/blob/main/LICENSE) licensed.
It will look like this in your readme
Useful links-
Original Link: https://dev.to/avneesh0612/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-3mg4
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To