Creating a codespace

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

Anyone can create a codespace for any public repository, or for any repository owned by their user account.

Codespaces is available for user accounts using GitHub Free or GitHub Pro. For more information, see "GitHub's products."

In this article

Note: Codespaces is currently in limited public beta and subject to change. During the beta period, GitHub does not make any guarantees about the availability of Codespaces. For more information about joining the beta, see "About Codespaces."

About codespace creation

Each codespace you create is only available to you. No one else can work in your codespace.

Each codespace is associated with a specific branch of a repository. You can create more than one codespace per repository or even per branch. However, each user account has a two-codespace limit during limited public beta. If you've reached the limit and want to create a new codespace, you must delete a codespace first. For more information, see "Deleting a codespace."

During the beta, private repositories owned by organizations or any repositories owned by an organization that requires SAML single sign-on are not supported.

You cannot create a codespace in an empty repository. If your repository is empty, create a file in the repository before creating a codespace. For more information, see "Adding a file to a repository" and "Adding a file to a repository using the command line."

The environment of the codespace you create will be based on the repository's configuration. For more information, see "Configuring Codespaces for your project."

You can also personalize aspects of the codespace environment for any codespace that your account creates. Personalization can include shell preferences and additional tools. For more information, see "Personalizing Codespaces for your account."

You can edit code, debug, and use Git commands while developing in a codespace with Visual Studio Code. For more information, see the Visual Studio Code documentation.

You can see every codespace owned by your user account at

Creating a codespace

  1. On GitHub, navigate to the main page of the repository.

  2. Under the repository name, use the "Branch" drop-down menu, and select the branch you want to create a codespace for.

    Branch drop-down menu

  3. Under the repository name, use the Code drop-down menu, and select Open with Codespaces.

    Open with Codespaces button

  4. To create a codespace using a Standard machine type, click New codespace.

    New codespace button

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.