Create a GitHub repository.

Create a GitHub accout and a GitHub organization before you create a GitHub repository.

  1. Create a Python program in IDLE. We’ll assume that the name of your program is hello.py.
  2. Log into your GitHub account.
  3. Pull down the triangle in the upper right corner and select Settings.
  4. In the Personal settings on the left, select Organizations.
  5. Select the organization SF19PB1-yourname that you created for this class.
  6. On the right, create a new repository by pressing the green New button.
  7. Let the repository name be the name of your Python program without the .py at the end of the name. For example, if your Python program is named hello.py, name the repository hello.
  8. Fill in a short description. Make sure the Public button is selected. Check the checkbox for ☑ Initialize the repository with a README. Press the green “Create repository” button.
  9. You should now see a list of all the files belonging to your new repository hello. (There will be only one file, named README.md. The md stands for Markdown.) Above this list, press the “Create new file” button. Copy and paste your Python program from its IDLE window into the GitHub page for your new file. You’ll paste the program immediately to the right of the line number 1 in the “Edit new file” tab. Above the tab, where it says “Name your file…”, type hello.py. Then scroll all the way down to the green “Commit new file” button and press it. You will find yourself back at the list of files belonging to your repository.

Admire the other students’ repositories. Here is the instructor’s GitHub account. It contains an organization named SF19PB1-MarkMeretzky. The organization contains a repository named hello, and the repository contains a file named hello.py. This file is a Python program.

If you want to download your hello.py from GitHub, click on hello.py, and then push the Raw button to the upper right of the file. This will get you the file hello.py without its line numbers.

If you want to delete the file hello.py from GitHub and try again, click on the garbage can to the right of the Raw button. Then scroll all the way down to the green “Commit changes” button and press it.