Guides for Codespaces
Learn how to make the most of GitHub
Quickstart for GitHub Codespaces
QuickstartTry out GitHub Codespaces in 5 minutes.
- Codespaces
Deep dive into GitHub Codespaces
QuickstartUnderstand how GitHub Codespaces works.
- Codespaces
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.
- Codespaces
- Set up
- Fundamentals
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.
- Codespaces
- Developer
- Set up
Setting up a Python project for GitHub Codespaces
TutorialGet started with a Python project in GitHub Codespaces by creating a custom dev container configuration.
- Codespaces
- Developer
- Set up
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.
- Codespaces
- Developer
- Set up
Setting up a Java project for GitHub Codespaces
TutorialGet started with a Java project in GitHub Codespaces by creating a custom dev container configuration.
- Codespaces
- Developer
- Set up
Setting up a PHP project for GitHub Codespaces
TutorialGet started with a PHP project in GitHub Codespaces by creating a custom dev container configuration.
- Codespaces
- Developer
- Set up
Setting a minimum specification for codespace machines
How-to guideYou can avoid under-resourced machine types being used for GitHub Codespaces for your repository.
- Codespaces
- Set up
Adding features to a devcontainer.json file
How-to guideWith features, you can quickly add tools, runtimes, or libraries to your dev container configuration.
- Codespaces
- Set up
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.
- Codespaces
- Set up
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.
- Codespaces
- Set up
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.
- Codespaces
- Set up
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.
- Codespaces
- Set up
Personalizing GitHub Codespaces for your account
How-to guideYou can personalize GitHub Codespaces by using a dotfiles repository on GitHub Enterprise Cloud or by using Settings Sync.
- Codespaces
- Set up
- Fundamentals
Creating a codespace for a repository
How-to guideYou can create a codespace for a branch in a repository to develop online.
- Codespaces
- Fundamentals
- Developer
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.
- Codespaces
- Fundamentals
- Developer
Developing in a codespace
How-to guideYou can work in a codespace using your browser, Visual Studio Code, a JetBrains IDE, or in a command shell.
- Codespaces
- Fundamentals
- Developer
Deleting a codespace
How-to guideYou can delete a codespace you no longer need.
- Codespaces
- Fundamentals
- Developer
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.
- Codespaces
- Fundamentals
- Developer
Opening an existing codespace
How-to guideYou can reopen a codespace that you have closed or stopped and return to your work.
- Codespaces
- Fundamentals
- Developer
Stopping and starting a codespace
How-to guideYou can stop and start your codespace to save resources and to pause work.
- Codespaces
- Fundamentals
- Developer
Working collaboratively in a codespace
How-to guideYou can work collaboratively with other people in a codespace by using Visual Studio Live Share.
- Codespaces
- Developer
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 account on GitHub Enterprise Cloud.
- Codespaces
- Visual Studio Code
- Developer
Using GitHub Codespaces in your JetBrains IDE
How-to guideYou can use the JetBrains Gateway to connect to your codespace and work in your favorite JetBrains IDE.
- Codespaces
- Developer
Using GitHub Codespaces with GitHub CLI
How-to guideYou can work with GitHub Codespaces directly from your command line by using gh, the GitHub Enterprise Cloud command line interface.
- Codespaces
- CLI
- Developer
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.
- Codespaces
- Fundamentals
- Developer
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.
- Codespaces
- Visual Studio Code
- Developer
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.
- Codespaces
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.
- Codespaces
Setting your default editor for GitHub Codespaces
How-to guideYou can set your default editor for Codespaces in your personal settings page.
- Codespaces
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.
- Codespaces
Setting your timeout period for GitHub Codespaces
How-to guideYou can set your default timeout for GitHub Codespaces in your personal settings page.
- Codespaces
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.
- Codespaces
- Developer
- Security
- Secret store
Managing access to other repositories within your codespace
You can manage the repositories that GitHub Codespaces can access.
- Codespaces
- Security
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.
- Codespaces
- Developer
- Security
Enabling or disabling GitHub Codespaces for your organization
How-to guideYou can control which users can use GitHub Codespaces in your organization's private and internal repositories.
- Codespaces
- Billing
- Administrator
Managing the cost of GitHub Codespaces in your organization
ReferenceYou can check your GitHub Codespaces usage and set usage limits.
- Codespaces
- Billing
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.
- Codespaces
- Secret store
- Security
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.
- Codespaces
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.
- Codespaces
Restricting the idle timeout period
How-to guideYou can set a maximum timeout period for any codespaces owned by your organization.
- Codespaces
Restricting the retention period for codespaces
How-to guideYou can set a maximum retention period for any codespaces owned by your organization.
- Codespaces
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.
- Codespaces
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.
- Codespaces
- Security
- Administrator
About billing for GitHub Codespaces
OverviewLearn about the costs for using GitHub Codespaces, and the monthly usage quotas included with GitHub personal accounts.
- Codespaces
- Billing
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.
- Codespaces
- Visual Studio Code
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.
- Codespaces
Security in GitHub Codespaces
ReferenceOverview of the GitHub Codespaces security architecture, with guidelines to help you maintain security and minimize the risk of attack.
- Codespaces
- Security