GitHub Codespaces

GitHub Codespaces is a cloud-based development environment that allows you to develop directly within GitHub. It is a browser-based version of Visual Studio Code with a file manager, editor, and shell to enter commands. All GitHub Classroom projects, exercises, and examples in this class have GitHub Codespaces available, and any cost is charged to the organization, not the student.

To create a GitHub Codespace:

  1. Go to your GitHub Classroom repository on GitHub
  2. Select the Code button
  3. Select the Codespaces tab
  4. Press the Create codespace on main

This will start the codespace in your browser. The codespace automatically:

At this point, you can enter git commands in the shell.

Local Visual Studio Code

If you want, you can connect a locally-run Visual Studio Code to an existing codespace.

  1. Install the GitHub Codespace Extension
  2. Start a codespaces on the web
  3. Go back to the GitHub repository page where you created the codespace
  4. Under the ... select the option Open in Visual Studio Code

At this point, you can close the browser codespace instance and work locally in that codespace.

Internals