GitHub Codespaces provides a complete, pre-configured development environment in your browser. No local setup required!
- Cloud-based development environment
- Full VS Code experience in your browser
- Pre-installed tools and extensions
- Automatic environment configuration
- Works on any device with a browser
- ✅ Zero Setup Time: Start coding in 2 minutes
- ✅ Consistent Environment: Everyone has the same setup
- ✅ Pre-installed Tools: All course requirements ready
- ✅ Cost Effective: 60 hours free per month
- ✅ Access Anywhere: Work from any device
You must fork the entire repository (individual directories cannot be forked):
- Go to the main course repository
- Click the Fork button (top-right corner)
- Select your GitHub account
- Wait for the fork to complete
- In your forked repository, click the green Code button
- Select the Codespaces tab
- Click Create codespace on main
- Choose machine type:
- 2-core: Basic exercises (default)
- 4-core: Better performance (recommended)
- 8-core: Heavy workloads
The first time takes 2-3 minutes to:
- Build the container
- Install all tools
- Configure extensions
- Set up the environment
Since you fork the entire repository, here's how to navigate:
your-fork/
├── modules/
│ ├── module-01/ # Start here for Module 1
│ ├── module-02/
│ ├── ...
│ ├── module-07/ # Web Applications
│ ├── ...
│ ├── module-13/ # Infrastructure as Code
│ └── module-30/
├── scripts/
├── templates/
└── README.md
# Navigate to your module
cd modules/module-07 # For web applications
cd modules/module-13 # For infrastructure as code
# Start working
code . # Opens in VS Code- Compute: 60 hours/month
- Storage: 15 GB/month
- Bandwidth: Unlimited
-
Stop Codespaces When Not in Use
# Via UI: Click "Stop codespace" in browser # Via CLI: gh codespace stop
-
Delete Unused Codespaces
# List all codespaces gh codespace list # Delete specific codespace gh codespace delete -c CODESPACE-NAME
-
Use Appropriate Machine Types
- 2-core for reading/light coding
- 4-core for active development
- 8-core only when needed
Your Codespace includes:
- Node.js 18.x
- Python 3.11
- .NET 7.0
- Java 17
- Go 1.20
- Azure CLI + Bicep
- AWS CLI
- Terraform
- Docker & Docker Compose
- Kubernetes tools (kubectl, helm)
- Git
- GitHub CLI
- VS Code Server
- Multiple VS Code extensions
cd modules/module-07
# All tools ready: React, FastAPI, Docker
./scripts/validate-module-07.shcd modules/module-13
# Azure CLI and Bicep pre-installed
az login --use-device-code
./scripts/check-prerequisites-script.sh# Create a branch for each module
git checkout -b module07-work
# Or for specific exercises
git checkout -b module13-exercise1# Save your work often
git add .
git commit -m "Complete exercise 1"
git push origin your-branch# Add upstream remote (one time)
git remote add upstream https://github.com/original/repository.git
# Sync with upstream
git fetch upstream
git checkout main
git merge upstream/main
git push origin main| Problem | Solution |
|---|---|
| Codespace won't start | Check GitHub status page |
| Slow performance | Upgrade to 4-core machine |
| Can't push changes | Check repository permissions |
| Extensions missing | Rebuild container |
| Terminal not working | Refresh browser |
If something goes wrong:
- Command Palette (Cmd/Ctrl + Shift + P)
- Type "Codespaces: Rebuild Container"
- Wait for rebuild
# Export your work
git stash
git stash save "backup before rebuild"
# After rebuild
git stash pop- Install VS Code locally
- Install "GitHub Codespaces" extension
- Connect to your cloud codespace
- Enjoy local performance with cloud environment
Create .devcontainer/devcontainer.json in your fork:
{
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.fontSize": 14,
"editor.fontSize": 14,
"editor.theme": "GitHub Dark"
}
}
}
}For API keys and tokens:
- Go to Settings → Codespaces
- Add repository secrets
- Access in codespace via environment variables
Speed up startup times:
- Go to repository Settings
- Select Codespaces → Prebuilds
- Add prebuild configuration
- Select branches to prebuild
# Check resource usage
df -h # Disk space
free -m # Memory
htop # CPU and processes# List your codespaces
gh codespace list
# Connect via SSH
gh codespace ssh -c CODESPACE-NAME
# Port forwarding
gh codespace ports forward 8000:8000 -c CODESPACE-NAME
# View logs
gh codespace logs -c CODESPACE-NAME# Show codespace details
echo $CODESPACE_NAME
echo $GITHUB_USER
printenv | grep GITHUB- Use keyboard shortcuts: Same as desktop VS Code
- Multi-window support: Open multiple browser tabs
- Share your codespace: Collaborate in real-time
- Use the terminal: Full Linux environment
- Install additional tools:
sudo apt-get install ...
Remember: Codespaces = No setup hassle + Start coding immediately! 🚀