Codespace Development Workflow

Follow these steps each time you work on a project in Codespaces. When working in a local environment you won't need to sync to GitHub (Step 3) unless you have started by cloning a project you cloned from GitHub and want to save your changes to that repository.

1. Edit and save

Chemeketa Worklog watches the project files and makes frequent Git commits as you save. These commits document how your program developed. They are stored in the working copy until you push them.

2. Build and run

Open Run and Debug in VS Code and choose the program or test configuration for your project. To build from the terminal instead, use the commands in Compile and Run.

3. Submit the assignment

Follow the submission instructions in the assignment. When a ZIP is required, open the Command Palette and run Zip Project, then upload the resulting project.zip file.

4. Sync to GitHub (Optional)

Making commits in your codespace (or having Chemeketa Worklog make them for you) does not automatically update the GitHub repository. You must sync or push your commits to GitHub to save your work there. Syncing your work back to GitHub is optional. But it is the only way to preserve your work after your codespace is deleted.

  1. Open Source Control in VS Code.
  2. Wait for Worklog to commit your most recent saved changes. If changes remain, commit them manually.
  3. Select Sync Changes or Push.
  4. Open the repository on GitHub and confirm that the latest files and commits appear.

5. Stop a Codespace

Closing the browser tab does not necessarily stop the Codespace. Open the Command Palette and run Codespaces: Stop Current Codespace, or manage it from github.com/codespaces.

Stopping preserves the Codespace. You can restart it later and continue working on the same project. This is like putting a computer to sleep.

Deleting a Codespace is equivalent to throwing away a computer. Only delete a Codespace once you are completely done with it. If you first sync your work to GitHub, you can delete the Codespace and later clone the repository to a new Codespace or to your local computer.

Projects that are stopped still consume storage space that counts against your quota on Github. Once you are done with a project (it is turned in and you have received a grade), you should delete the Codespace to free up storage space.