Creating a new license file in github

To create a new license file in GitHub, you can follow these steps:

Step 1: Create a new file

  1. Log in to your GitHub account and navigate to your repository.
  2. Click on the "Create a new file" button in the top right corner of the repository page.
  3. In the "Create a new file" dialog box, enter the name of your license file, for example, "LICENSE".
  4. Click on the "Create file" button.

Step 2: Add the license text

  1. In the new file, add the text of your chosen license. You can copy and paste the text from a license template or write it yourself.
  2. Make sure to include the following information:
    • The name of the license (e.g., "MIT License")
    • The copyright holder (e.g., "Your Name")
    • The date of the license
    • Any specific terms or conditions of the license
  3. Save the file.

Step 3: Commit and push the changes

  1. Commit the changes to your local repository using the command git add. and git commit -m "Added license file" (replace the commit message with a meaningful one).
  2. Push the changes to your remote repository using the command git push origin master (assuming your repository is named "master").

Step 4: Update your repository settings

  1. Go to your repository settings by clicking on the gear icon in the top right corner of the repository page.
  2. Click on "Licenses" in the left-hand menu.
  3. Select the license file you just created from the dropdown menu.
  4. Click on the "Save" button.

That's it! Your new license file is now associated with your repository.