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…


This content originally appeared on DEV Community and was authored by Avneesh Agarwal

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
    image.png

  • Now click on Create new file. You will be directed to a page like this

image.png

  • Type License as the name of the file and you should see Choose a license template button in the left corner.

image.png

  • Now choose any License you need from the options given.

image.png

  • 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.

image.png

  • 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.

image.png

You have added a license to your repository ?.

YayCongratsGIF.gif

Now you can add it to your Readme as well. Here is a sample of how it is added in many repositories -

## ? License

Copyright © 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

image.png

Useful links-

Git and GitHub Crash course

GitHub

All socials


This content originally appeared on DEV Community and was authored by Avneesh Agarwal


Print Share Comment Cite Upload Translate Updates
APA

Avneesh Agarwal | Sciencx (2021-08-26T09:42:48+00:00) How to add a license to a GitHub repository in less than 2 minutes ✨. Retrieved from https://www.scien.cx/2021/08/26/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-%e2%9c%a8/

MLA
" » How to add a license to a GitHub repository in less than 2 minutes ✨." Avneesh Agarwal | Sciencx - Thursday August 26, 2021, https://www.scien.cx/2021/08/26/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-%e2%9c%a8/
HARVARD
Avneesh Agarwal | Sciencx Thursday August 26, 2021 » How to add a license to a GitHub repository in less than 2 minutes ✨., viewed ,<https://www.scien.cx/2021/08/26/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-%e2%9c%a8/>
VANCOUVER
Avneesh Agarwal | Sciencx - » How to add a license to a GitHub repository in less than 2 minutes ✨. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/26/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-%e2%9c%a8/
CHICAGO
" » How to add a license to a GitHub repository in less than 2 minutes ✨." Avneesh Agarwal | Sciencx - Accessed . https://www.scien.cx/2021/08/26/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-%e2%9c%a8/
IEEE
" » How to add a license to a GitHub repository in less than 2 minutes ✨." Avneesh Agarwal | Sciencx [Online]. Available: https://www.scien.cx/2021/08/26/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-%e2%9c%a8/. [Accessed: ]
rf:citation
» How to add a license to a GitHub repository in less than 2 minutes ✨ | Avneesh Agarwal | Sciencx | https://www.scien.cx/2021/08/26/how-to-add-a-license-to-a-github-repository-in-less-than-2-minutes-%e2%9c%a8/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.