codespace を作成する

リポジトリのブランチの codespace を作成して、オンラインで開発できます。

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

codespace の作成について

You can create a codespace on either GitHub.com or in Visual Studio Code. 各コードスペースは、作成者だけが利用できます。 他者のcodespaceで作業することはできません。

Codespaces are associated with a specific branch of a repository and the repository cannot be empty. リポジトリごと、さらにはブランチごとに1つ以上のcodespaceを作成できます。 しかし、限定パブリックベータの間は、ユーザアカウントごとに2つのcodespaceという制限があります。 この制限に達した場合に新しいcodespaceを作成したいなら、まずcodespaceを削除しなければなりません。 For more information, see "Deleting a codespace."

When you create a codespace, a number of steps happen to enable full access to your development environment.

  • Resources such as a VM and storage for your container are assigned. A new VM is created every time you create or start a codespace to ensure that you always have the latest versions and security patches.
  • Codespaces recieves information about your repository, branch, commits, your public dotfiles repository, and any secrets that you have created.
  • Codespaces executes a shallow clone of the repository.
  • If you have one in your repository, Codespaces runs the devcontainer.json file. 詳しい情報については、「プロジェクトの Codespaces を設定する」を参照してください。
  • Your Docker container, docker-compose, or other initialization is run.
  • At this point, the codespace is marked as available and you can connect.
  • Once the codespace is made available, depending on the commands in the devcontainer, the codespace will continue with some set up.
    • The codespace shares ports added in the devcontainer.json file.
    • The codespace runs anything specified in postCreateCommand.
    • Codespaces clones your dotfiles repository to the codespaces environment and looks for an install file. For more information, see "Personalizing Codespaces for your account."
    • Finally, the codespace does a full clone of the repo so you have full access to it.

Visual Studio Codeでcodespace内で開発をする間に、コードを編集し、デバッグし、Gtiのコマンドを使うことができます。 詳しい情報についてはVisual Studio Codeのドキュメンテーションを参照してください。

作成した利用可能なすべてのcodespaceはgithub.com/codespacesで見ることができます。

codespace を作成する

  1. GitHubで、リポジトリのメインページにアクセスしてください。

  2. リポジトリ名の下で、[Branch] ドロップダウンメニューを使用して、codespace を作成するブランチを選択します。

    [Branch] ドロップダウンメニュー

  3. リポジトリ名の下で、 [Code] ドロップダウンメニューを使用して、[Open with Codespaces] を選択します。

    [Open with Codespaces] ボタン

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

    [New codespace] ボタン

このドキュメントは役立ちましたか?プライバシーポリシー

これらのドキュメントを素晴らしいものにするのを手伝ってください!

GitHubのすべてのドキュメントはオープンソースです。間違っていたり、はっきりしないところがありましたか?Pull Requestをお送りください。

コントリビューションを行う

OR, コントリビューションの方法を学んでください。

問題がまだ解決していませんか?

GitHubコミュニティで質問するサポートへの連絡