Guides for Codespaces
Learn how to make the most of GitHub
Quickstart for GitHub Codespaces
Get started with GitHub Codespaces quickly.
Deep dive into GitHub Codespaces
QuickstartExplore more detail about how GitHub Codespaces work.
Introduction to dev containers
How-to guideWhen you work in a codespace, the environment you are working in is created using a development container, or dev container, hosted on a virtual machine.
Setting up a Node.js project for GitHub Codespaces
TutorialGet started with a Node.js, JavaScript, or TypeScript project in GitHub Codespaces by creating a custom dev container configuration.
Setting up a Python project for GitHub Codespaces
TutorialGet started with a Python project in GitHub Codespaces by creating a custom dev container configuration.
Setting up a C# (.NET) project for GitHub Codespaces
TutorialGet started with a C# (.NET) project in GitHub Codespaces by creating a custom dev container configuration.
Setting up a Java project for GitHub Codespaces
TutorialGet started with a Java project in GitHub Codespaces by creating a custom dev container configuration.
Setting up a PHP project for GitHub Codespaces
TutorialGet started with a PHP project in GitHub Codespaces by creating a custom dev container configuration.
Setting a minimum specification for codespace machines
How-to guideYou can avoid under-resourced machine types being used for GitHub Codespaces for your repository.
Adding features to a devcontainer.json file
How-to guideWith features, you can quickly add tools, runtimes, or libraries to your dev container configuration.
Automatically opening files in the codespaces for a repository
How-to guideYou can set particular files to be opened automatically whenever someone creates a codespace for your repository and opens the codespace in the Visual Studio Code web client.
Specifying recommended secrets for a repository
How-to guideYou can add a setting to your dev container configuration that will prompt people to set specific development environment secrets when they create a codespace.
Facilitating quick creation and resumption of codespaces
How-to guideYou can add a link to take people straight to a page for creating a codespace, with your choice of options preconfigured. Alternatively you can link to the "Resume codespace" page.
Setting up a template repository for GitHub Codespaces
How-to guideYou can help people get started with a project by setting up a template repository for use with GitHub Codespaces.
Personalizing GitHub Codespaces for your account
How-to guideYou can personalize GitHub Codespaces by using a dotfiles repository on GitHub or by using Settings Sync.
Creating a codespace for a repository
How-to guideYou can create a codespace for a branch in a repository to develop online.
Creating a codespace from a template
How-to guideIf you're starting a new project, you can create a codespace from a blank template or choose a template specially designed for the type of work you want to do.
Developing in a codespace
How-to guideYou can work in a codespace using your browser, Visual Studio Code, or in a command shell.
Deleting a codespace
How-to guideYou can delete a codespace you no longer need.
Forwarding ports in your codespace
How-to guideYou can forward ports in your codespace to test and debug your application. You can also manage the port protocol and share the port within your organization or publicly.
Opening an existing codespace
How-to guideYou can reopen a codespace that you have closed or stopped and return to your work.
Stopping and starting a codespace
How-to guideYou can stop and start your codespace to save resources and to pause work.
Working collaboratively in a codespace
How-to guideYou can work collaboratively with other people in a codespace by using Visual Studio Live Share.
Using GitHub Codespaces in Visual Studio Code
How-to guideYou can develop in your codespace directly in Visual Studio Code by connecting the GitHub Codespaces extension with your GitHub account.
Using GitHub Codespaces with GitHub CLI
How-to guideYou can work with GitHub Codespaces directly from your command line by using gh, the GitHub command line interface.
Using source control in your codespace
How-to guideAfter making changes to a file in your codespace you can quickly commit the changes and push your update to the remote repository.
Using GitHub Codespaces for pull requests
How-to guideYou can use GitHub Codespaces in your web browser, or in Visual Studio Code to create pull requests, review pull requests, and address review comments.
Changing the machine type for your codespace
How-to guideYou can change the type of machine that's running your codespace, so that you're using resources appropriate for the work you're doing.
Configuring automatic deletion of your codespaces
How-to guideInactive codespaces are automatically deleted. You can choose how long your stopped codespaces are retained, up to a maximum of 30 days.
Setting your default editor for GitHub Codespaces
How-to guideYou can set your default editor for Codespaces in your personal settings page.
Setting your default region for GitHub Codespaces
How-to guideYou can set your default region in the GitHub Codespaces profile settings page to personalize where your data is held.
Setting your timeout period for GitHub Codespaces
How-to guideYou can set your default timeout for GitHub Codespaces in your personal settings page.
Managing your account-specific secrets for GitHub Codespaces
How-to guideYou can store sensitive information, like tokens, that you want to access in your codespaces via environment variables.
Managing access to other repositories within your codespace
You can manage the repositories that GitHub Codespaces can access.
Managing GPG verification for GitHub Codespaces
How-to guideYou can allow GitHub to automatically use GPG to sign commits you make in your codespaces, so other people can be confident that the changes come from a trusted source.
Enabling or disabling GitHub Codespaces for your organization
How-to guideYou can control which users can use GitHub Codespaces in your organization's private repositories.
Managing the cost of GitHub Codespaces in your organization
ReferenceYou can check your GitHub Codespaces usage and set usage limits.
Managing development environment secrets for your repository or organization
Development environment secrets allow you to store sensitive information in your organization or repository for use with GitHub Codespaces.
Restricting access to machine types
How-to guideYou can set constraints on the types of machines users can choose when they create codespaces in your organization.
Restricting the base image for codespaces
How-to guideYou can specify which base images can be used to create the dev container for new codespaces created within your organization.
Restricting the idle timeout period
How-to guideYou can set a maximum timeout period for any codespaces owned by your organization.
Restricting the retention period for codespaces
How-to guideYou can set a maximum retention period for any codespaces owned by your organization.
Restricting the visibility of forwarded ports
How-to guideYou can set constraints on the visibility options users can choose when they forward ports from codespaces in your organization.
Reviewing your organization's audit logs for GitHub Codespaces
How-to guideYou can use the audit log to review all actions related to GitHub Codespaces.
GitHub Codespaces billing
Learn about the costs for using GitHub Codespaces, and the monthly usage quotas included with GitHub personal accounts.
Using the Visual Studio Code Command Palette in GitHub Codespaces
ReferenceYou can use the Command Palette feature of Visual Studio Code to access many commands in GitHub Codespaces.
Disaster recovery for GitHub Codespaces
This article describes guidance for a disaster recovery scenario, when a whole region experiences an outage due to major natural disaster or widespread service interruption.
Security in GitHub Codespaces
ReferenceOverview of the GitHub Codespaces security architecture, with guidelines to help you maintain security and minimize the risk of attack.