How to start a GitHub Codespace from a repository
On GitHub.com (verified 2026-10-24), open a repository, click the green Code button > Codespaces tab > Create codespace on main (or your branch). Wait for the cloud VM and VS Code-style editor to boot, then edit, commit and push as usual.
Stop unused codespaces from the Codespaces page so they do not keep consuming core hours. Personal accounts include a monthly free quota; orgs may bill or restrict Codespaces.
Applies to GitHub.com repositories where Codespaces is enabled for your account or organization. Some orgs disable Codespaces or require policies. Browser editor works without installing VS Code; the desktop VS Code app can attach too.
Spin up a cloud editor for a repo
Create the codespace
- Open the repo on GitHub.com.
- Click Code > Codespaces > Create codespace on ….
- Wait until the editor and terminal are ready.
Work as usual
- Edit files in the browser VS Code UI.
- Use the integrated terminal for installs and tests.
- Commit and push to the remote branch.
Stop when done
- Open github.com/codespaces (or your profile Codespaces).
- Stop or delete idle codespaces to free quota.
- Restart later from the same page when you return.
Our take: stop overnight, do not leave it running
A forgotten codespace burns free hours. Stop when you walk away; storage may still count until you delete.
If it fails
- Codespaces tab missing: org policy or feature disabled — ask an admin.
- Create fails / quota: check billing and remaining core hours.
- Slow start: first boot installs dependencies from devcontainer — wait or simplify the config.
- Cannot push: authenticate inside the codespace or check branch protection.
Frequently asked questions
What is a GitHub Codespace?
A cloud development environment tied to a GitHub repository, editable in the browser or VS Code.
How do I create a Codespace?
Repo > Code > Codespaces > Create codespace on your branch.
Is Codespaces free?
Personal accounts get a monthly free quota; usage beyond that and org policies may bill.
Codespaces vs cloning locally?
Codespaces runs in the cloud with a consistent machine; local clones use your laptop resources.
How do I stop a Codespace?
From the Codespaces list, stop or delete the instance when you are finished.