CS 159

Copying Starter Code

This guide walks you step-by-step through the process of copying starter code for lab assignments. You will need to do this for each lab. If you are working with a partner, only one partner needs to follow these steps per lab.

  1. At the start of the lab writeup on this website, there should be a button labeled "Link to starter code". Clicking this button should take you to the GitHub template containing the lab's starter code.
  2. On the GitHub template page, there should be a button in the top right corner labeled "Use this template". Clicking on the button should open a dropdown menu; from this menu, select the option "Create a new repository" (see image below):
    "Use this template" menu on GitHub
  3. This will take you to the repository creation page. On this page, make sure to enter a name for your repository, which should use the format lab<number>-<first partner's name>-<second partner's name>, as in the screenshot below. Also make sure to set the visibility to Private, so your classmates can't see your code!
    Repository setup page
  4. Your repository has been created with the starter code and is ready to go! You can now clone it in VS Code, or any other editor of your choice, to start working.
  5. If you are working with a partner: Since the repository is private, you will need to give your partner access so they can contribute to it. Under the Settings page of your newly created repository on GitHub, click "Collaborators and teams", which should take you to a page like this:
    GitHub access settings
    Click "Add people", search for your partner's GitHub username, and select them from the list once you've found them (make sure you're selecting the right person!)

If you need further help, please ask during a lab session, or in office/grutoring hours.

(When logged in, completion status appears here.)