Include an open source license in your repository to make it easier for other people to contribute.

Disclaimer: GitHub is a lot of things, but it’s not a law firm. As such, GitHub does not provide legal advice. Using the license information displayed on GitHub Enterprise or sending us an email about it does not constitute legal advice nor does it create an attorney-client relationship. If you have any questions about what you can and can't do with a particular license, you should consult with your own legal counsel before moving forward. In fact, you should always consult with your own lawyer before making any decisions that might have legal ramifications or that may impact your legal rights.

GitHub displays license information to help users get information about open source licenses and the projects that use them. We hope it helps, but please keep in mind that we’re not lawyers (at least most of us aren't) and that we make mistakes like everyone else. For that reason, GitHub provides the information on an “as-is” basis and makes no warranties regarding any information or licenses provided on or through it, and disclaims liability for damages resulting from using the license information.

Including an open source license in your repository

  1. On GitHub Enterprise, navigate to the main page of the repository.

  2. Above the file list, click . The create new file button

  3. In the file name field, type LICENSE or LICENSE.txt (with all caps). The file name field with LICENSE filled in

  4. To the right of the file name, click Choose a license: None to choose your desired license. If you don't find the license you want, manually paste the full text. The Choose a license drop-down button

  5. At the bottom of the page, type a short, meaningful commit message that describes the change you made to the file. Commit message for your change

  6. 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 master, you should choose to create a new branch for your commit and then create a pull request. Commit branch options

  7. Click Propose new file. Commit new file button

Further reading