GitHub Codespaces provides cloud-hosted development environments that run in Docker containers on GitHub's infrastructure, eliminating local setup overhead while delivering consistent, pre-configured workspaces accessible from any device. Unlike traditional local development, Codespaces brings compute, storage, and runtime to the cloud, enabling instant environment provisioning through devcontainer configuration files that define tools, extensions, and dependencies. The key mental model: your repository becomes a template for reproducible environments—every contributor gets an identical workspace within seconds, and your local machine becomes merely a thin client to powerful remote compute resources that can scale from 2-core/8GB to 32-core/128GB configurations.
What This Cheat Sheet Covers
This topic spans 14 focused tables and 102 indexed concepts, 68 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Machine Types and Resources
The size of your codespace directly shapes how fast it builds and how much it costs, so picking the right tier is the first decision you make. These options span a 2-core starter machine up to a 32-core monster, with the region you choose and the per-GB storage charge rounding out what you actually pay for.
| Type | Example | Description | |
|---|---|---|---|
2 cores, 8 GB RAM, 32 GB storage | • Default machine type for most workloads • suitable for web development, scripting, and light compilation. | ||
4 cores, 16 GB RAM, 32 GB storage | Upgraded resources with 2x RAM and 30% better CPU performance (as of August 2023) at same cost. | ||
8 cores, 32 GB RAM, 64 GB storage | Suited for larger builds, multiple services, or database-heavy workflows. | ||
16 cores, 64 GB RAM, 128 GB storage | High-performance tier for monorepo builds, CI/CD tasks, or resource-intensive development. | ||
32 cores, 128 GB RAM, 128 GB storage | Maximum available resources for enterprise workloads and complex multi-service architectures. | ||
"hostRequirements": { "cpus": 4} | • Defines minimum machine requirements in devcontainer.json • prevents insufficient resource allocation | ||
US East, US West, Europe, Southeast Asia | • Codespaces can be created in multiple regions • closer region reduces latency and improves performance | ||
~$0.07/GB/month | • Storage is billed even when codespace is stopped (not running) • persistent data incurs ongoing cost |