GitHub Codespaces

What is Codespaces?

GitHub Codespaces gives you a full code editor in your browser. It looks and works like VS Code (which Cursor is based on), but you don't need to install anything. Your code runs on GitHub's servers, not your computer.

This is useful if you're on a Chromebook or any machine where you can't install Cursor.

When to use Codespaces vs Cursor

Use Codespaces if...Use Cursor if...
You're on a ChromebookYou're on a Mac or Windows laptop
You can't install software on your computerYou can install apps normally
You need to work from a different computerYou want built-in AI chat for help

Codespaces doesn't have Cursor's AI chat built in, but the editor is otherwise very similar. You can still write code, use the terminal, and push to GitHub the same way.

How to open a Codespace

  1. Go to your repo on GitHub (github.com)
  2. Click the green Code button
  3. Switch to the Codespaces tab
  4. Click Create codespace on main

A new browser tab opens with your editor. It takes about 30 seconds to load the first time.

That's it. You're now editing your project in the browser.

The interface

Codespaces looks almost identical to Cursor:

  • File explorer on the left -- your project files and folders
  • Editor in the center -- where you write code
  • Terminal at the bottom -- where you run commands

To open the terminal if it's not visible: View > Terminal (or press Ctrl+`).

Making changes and pushing to GitHub

The workflow is the same as Cursor. The only difference is everything happens in your browser.

1. Edit your files

Click a file in the explorer, make changes, save with Ctrl+S.

2. Commit

Click the Source Control icon in the left sidebar (the branch icon). You'll see your changed files.

  • Click + to stage files
  • Type a commit message (e.g. "updated homepage")
  • Click the checkmark to commit

3. Push

Click "Sync Changes" to push your commits to GitHub.

Or use the terminal:

git add .
git commit -m "updated homepage"
git push

Important things to know

  • Your Codespace saves automatically but you still need to commit and push to get your code onto GitHub. Auto-save only saves within the Codespace itself.
  • Free tier limits: GitHub gives you about 60 hours/month of Codespaces time on the free plan. That's plenty for this class, but close your Codespace when you're done working to avoid using up time. It will stop automatically after 30 minutes of inactivity.
  • Closing vs stopping: Closing the browser tab doesn't stop the Codespace. To actually stop it, go to github.com/codespaces and click the three-dot menu next to your Codespace, then "Stop codespace."
  • Your work persists between sessions. When you reopen a stopped Codespace, everything is still there.

Common problems

ProblemFix
Codespace is slow to loadNormal for first launch. Wait 30-60 seconds.
"You've used your monthly hours"Stop unused Codespaces at github.com/codespaces. Ask an instructor if you're stuck.
Terminal won't openTry View > Terminal from the menu bar, or press Ctrl+`
Changes disappearedYou probably didn't commit and push before your Codespace stopped. Check your repo on GitHub to see what was last pushed.

Quick reference

ActionHow
Open a CodespaceGreen "Code" button on your repo > Codespaces tab > Create
SaveCtrl+S
Open terminalView > Terminal or Ctrl+`
CommitSource Control sidebar > stage files > write message > checkmark
Push"Sync Changes" button or git push in terminal
Stop a Codespacegithub.com/codespaces > three-dot menu > Stop