Adding files from your web browser

  1. Navigate to the GitHub repository you want to add files to.
  2. Click on the Add file dropdown button and select one of the options:
    1. Create new file
      1. Name your file in the box near the top left corner. Include the file extension (for example, about.md instead of about).
      2. Write your code and/or content in the <> Edit new file box.
    2. Upload files
      • Click and drag the files from your file system into the indicated space. Or, click choose your files to navigate your file system instead of clicking and dragging.
  3. (Optional) Once you are finished creating or uploading your file, add a commit message in the first box underneath the Commit changes heading.
  4. Ensure that the Commit directly to the master branch option is selected.
  5. Click the green Commit changes button.

Adding files from the CLI

  1. Navigate to the GitHub repository you want to add files to.
  2. If you are adding a new file to this repository:
  3. If you are adding an existing file to this repository:
  4. Stage your change with git add <your filename here>.
  5. Commit your change with git ci.
  6. Push your change to GitHub with git push origin master.

Adding files from the GitHub desktop app