Adding an open-source license to your GitHub project clarifies the terms under which others can use your work.
This can clear up potential confusion or avoid legal issues that may arise from infringement of the contract rights.
Learn how to add open-source licenses to your projects hosted on GitHub.
Many different open-source licenses are available, each with its own terms and conditions.
This license does not require users to credit you as the original creator.
Instead, it simply requires that users include a copy of the license with any distribution of your project.
Projects such asBabel, .NET, Rails, and most npm projects use the MIT License.
Projects such asKubernetes, PDF.js, and The Swift Programming Language use the Apache license.
Projects such asAnsible, Bash, and GIMP use the GPL license.
It is important first to determine your projects goals.
Then review the terms and conditions of each license before choosing a license for your project.
Then click theAdd filedropdown and select theCreate new fileoption, as shown in the image below.
Then, clickReview and submit, as shown in the image below.