Skip to main content

Developing in a codespace

Create a codespace to get started with developing your project inside a dedicated cloud environment. You can use your codespace in the browser or in a choice of code editors.

Developing in a codespace

You can work in a codespace using your browser, Visual Studio Code, a JetBrains IDE, or in a command shell.

Creating a codespace for a repository

You can create a codespace for a branch in a repository to develop online.

Creating a codespace from a template

If 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.

Deleting a codespace

You can delete a codespace you no longer need.

Opening an existing codespace

You can reopen a codespace that you have closed or stopped and return to your work.

Working collaboratively in a codespace

You can work collaboratively with other people in a codespace by using Visual Studio Live Share.

Using source control in your codespace

After 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

You can use GitHub Codespaces in your web browser, or in Visual Studio Code to create pull requests, review pull requests, and address review comments.

Stopping and starting a codespace

You can stop and start your codespace to save resources and to pause work.

Forwarding ports in your codespace

You 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.

Rebuilding the container in a codespace

You can rebuild the dev container of a codespace you are working in to apply configuration changes. From time to time, you may want to perform a full rebuild.

Default environment variables for your codespace

GitHub sets default environment variables for each codespace.

Persisting environment variables and temporary files

You can configure custom environment variables so that they are set to the same value every time you open a codespace. You can also ensure that temporary files are not deleted when a codespace stops.

Connecting to a private network

You can connect GitHub Codespaces to resources on a private network, including package registries, license servers, and on-premises databases.

Getting started with GitHub Codespaces for machine learning

Learn about working on machine learning projects with GitHub Codespaces and its out-of-the-box tools.

Using GitHub Codespaces in Visual Studio Code

You can develop in your codespace directly in Visual Studio Code by connecting the GitHub Codespaces extension with your account on GitHub Enterprise Cloud.

Using GitHub Codespaces in your JetBrains IDE

You can use the JetBrains Gateway to connect to your codespace and work in your favorite JetBrains IDE.

Using GitHub Codespaces with GitHub CLI

You can work with GitHub Codespaces directly from your command line by using gh, the GitHub Enterprise Cloud command line interface.