Merge branch 'main' into codewithdev-changes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Codespaces lifecycle
|
||||
intro: 'You can develop in a {% data variables.product.prodname_codespaces %} environment and maintain your data throughout the entire codespace lifecycle.'
|
||||
intro: 'You can develop in a {% data variables.product.prodname_github_codespaces %} environment and maintain your data throughout the entire codespace lifecycle.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
@@ -17,7 +17,7 @@ The lifecycle of a codespace begins when you create a codespace and ends when yo
|
||||
|
||||
## Creating a codespace
|
||||
|
||||
When you want to work on a project, you can choose to create a new codespace or open an existing codespace. You might want to create a new codespace from a branch of your project each time you develop in {% data variables.product.prodname_codespaces %} or keep a long-running codespace for a feature. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
|
||||
When you want to work on a project, you can choose to create a new codespace or open an existing codespace. You might want to create a new codespace from a branch of your project each time you develop in {% data variables.product.prodname_github_codespaces %} or keep a long-running codespace for a feature. For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
|
||||
|
||||
{% data reusables.codespaces.max-number-codespaces %} Similarly, if you reach the maximum number of active codespaces and you try to start another, you are prompted to stop one of your active codespaces.
|
||||
|
||||
@@ -61,11 +61,7 @@ ln -sf $PWD/.devcontainer/config $HOME/config && set +x
|
||||
|
||||
## Stopping a codespace
|
||||
|
||||
You can stop a codespace at any time. When you stop a codespace, any running processes are stopped and the terminal history is cleared. Any saved changes in your codespace will still be available when you next start it. If you do not explicitly stop a codespace, it will continue to run until it times out from inactivity. For more information, see "[Codespaces timeouts](#codespaces-timeouts)."
|
||||
|
||||
Only running codespaces incur CPU charges; a stopped codespace incurs only storage costs.
|
||||
|
||||
You may want to stop and restart a codespace to apply changes to it. For example, if you change the machine type used for your codespace, you will need to stop and restart it for the change to take effect. You can also stop your codespace and choose to restart or delete it if you encounter an error or something unexpected. For more information, see "[Suspending or stopping a codespace](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)."
|
||||
{% data reusables.codespaces.stopping-a-codespace %} For more information, see "[Stopping and starting a codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)."
|
||||
|
||||
## Deleting a codespace
|
||||
|
||||
@@ -73,12 +69,14 @@ You can create a codespace for a particular task and then safely delete the code
|
||||
|
||||
If you try to delete a codespace with unpushed git commits, your editor will notify you that you have changes that have not been pushed to a remote branch. You can push any desired changes and then delete your codespace, or continue to delete your codespace and any uncommitted changes. You can also export your code to a new branch without creating a new codespace. For more information, see "[Exporting changes to a branch](/codespaces/troubleshooting/exporting-changes-to-a-branch)."
|
||||
|
||||
Codespaces that have been stopped and remain inactive for a specified period of time will be deleted automatically. By default, inactive codespaces are deleted after 30 days, but you can customize your codespace retention period. For more information, see "[Configuring automatic deletion of your codespaces](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)."
|
||||
|
||||
You will be charged for the storage of all your codespaces. When you delete a codespace, you will no longer be charged.
|
||||
|
||||
For more information on deleting a codespace, see "[Deleting a codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)."
|
||||
|
||||
## Losing the connection while using Codespaces
|
||||
|
||||
{% data variables.product.prodname_codespaces %} is a cloud-based development environment and requires an internet connection. If you lose connection to the internet while working in a codespace, you will not be able to access your codespace. However, any uncommitted changes will be saved. When you have access to an internet connection again, you can connect to your codespace in the exact same state that it was left in. If you have an unstable internet connection, you should commit and push your changes often.
|
||||
{% data variables.product.prodname_github_codespaces %} is a cloud-based development environment and requires an internet connection. If you lose connection to the internet while working in a codespace, you will not be able to access your codespace. However, any uncommitted changes will be saved. When you have access to an internet connection again, you can connect to your codespace in the exact same state that it was left in. If you have an unstable internet connection, you should commit and push your changes often.
|
||||
|
||||
If you know that you will often be working offline, you can use your `devcontainer.json` file with the ["{% data variables.product.prodname_vscode %} Remote - Containers" extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) to build and attach to a local development container for your repository. For more information, see [Developing inside a container](https://code.visualstudio.com/docs/remote/containers) in the {% data variables.product.prodname_vscode %} documentation.
|
||||
|
||||
@@ -18,7 +18,7 @@ By default, your codespaces have access to all resources on the public internet,
|
||||
|
||||
## Connecting to resources on a private network
|
||||
|
||||
There are currently two methods of accessing resources on a private network within Codespaces.
|
||||
There are currently two methods of accessing resources on a private network within {% data variables.product.prodname_github_codespaces %}.
|
||||
- Using a {% data variables.product.prodname_cli %} extension to configure your local machine as a gateway to remote resources.
|
||||
- Using a VPN.
|
||||
|
||||
@@ -41,7 +41,7 @@ As an alternative to the {% data variables.product.prodname_cli %} extension, yo
|
||||
|
||||
We recommend VPN tools like [OpenVPN](https://openvpn.net/) to access resources on a private network. For more information, see "[Using the OpenVPN client from GitHub Codespaces](https://github.com/codespaces-contrib/codespaces-openvpn)."
|
||||
|
||||
There are also a number of third party solutions that, while not explicitly endorsed by {% data variables.product.prodname_dotcom %}, have provided examples of how to integrate with {% data variables.product.prodname_codespaces %}.
|
||||
There are also a number of third party solutions that, while not explicitly endorsed by {% data variables.product.prodname_dotcom %}, have provided examples of how to integrate with {% data variables.product.prodname_github_codespaces %}.
|
||||
|
||||
These third party solutions include:
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Or both of these are true:
|
||||
* You are participating in the beta of {% data variables.product.prodname_codespaces %} for individual users.
|
||||
* Either you own the repository for which you want to create a codespace, or it is owned by an organization of which you are either a member or an outside collaborator.
|
||||
|
||||
Before {% data variables.product.prodname_codespaces %} can be used in an organization, an owner or billing manager must have set a spending limit. For more information, see "[About spending limits for Codespaces](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces#about-spending-limits-for-codespaces)."
|
||||
Before {% data variables.product.prodname_codespaces %} can be used in an organization, an owner or billing manager must have set a spending limit. For more information, see "[Managing spending limits for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-github-codespaces#about-spending-limits-for-codespaces)."
|
||||
|
||||
Organization owners can specify who can create and use codespaces at the organization's expense. Organization owners can also prevent any codespace usage being charged to the organization. For more information, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)."
|
||||
|
||||
@@ -150,4 +150,5 @@ For full details of the options for this command, see [the {% data variables.pro
|
||||
{% endcli %}
|
||||
|
||||
## Further reading
|
||||
- "[Opening an existing codespace](/codespaces/developing-in-codespaces/opening-an-existing-codespace)"
|
||||
- "[Adding an 'Open in GitHub Codespaces' badge](/codespaces/setting-up-your-project-for-codespaces/adding-a-codespaces-badge)"
|
||||
@@ -24,9 +24,8 @@ There are costs associated with storing codespaces. You should therefore delete
|
||||
|
||||
{% webui %}
|
||||
|
||||
1. Navigate to the "Your Codespaces" page at [github.com/codespaces](https://github.com/codespaces).
|
||||
|
||||
2. To the right of the codespace you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **{% octicon "trash" aria-label="The trash icon" %} Delete**
|
||||
{% data reusables.codespaces.your-codespaces-procedure-step %}
|
||||
1. To the right of the codespace you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then click **{% octicon "trash" aria-label="The trash icon" %} Delete**
|
||||
|
||||

|
||||
|
||||
@@ -124,4 +123,5 @@ For more information, click the "{% data variables.product.prodname_cli %}" tab
|
||||
You can also use the REST API to delete codespaces for your organization. For more information, see "[Codespaces organizations](/rest/codespaces/organizations#delete-a-codespace-from-the-organization)."
|
||||
|
||||
## Further reading
|
||||
- "[Codespaces lifecycle](/codespaces/developing-in-codespaces/codespaces-lifecycle)"
|
||||
- "[Codespaces lifecycle](/codespaces/developing-in-codespaces/codespaces-lifecycle)"
|
||||
- "[Configuring automatic deletion of your codespaces](/codespaces/customizing-your-codespace/configuring-automatic-deletion-of-your-codespaces)"
|
||||
@@ -36,13 +36,13 @@ For more information on using {% data variables.product.prodname_vscode_shortnam
|
||||
|
||||
{% data reusables.codespaces.connect-to-codespace-from-vscode %}
|
||||
|
||||
{% data reusables.codespaces.use-chrome %} For more information, see "[Troubleshooting Codespaces clients](/codespaces/troubleshooting/troubleshooting-codespaces-clients)."
|
||||
{% data reusables.codespaces.use-chrome %} For more information, see "[Troubleshooting {% data variables.product.prodname_github_codespaces %} clients](/codespaces/troubleshooting/troubleshooting-codespaces-clients)."
|
||||
|
||||
### Personalizing your codespace
|
||||
|
||||
{% data reusables.codespaces.about-personalization %} For more information, see "[Personalizing {% data variables.product.prodname_github_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)."
|
||||
|
||||
{% data reusables.codespaces.apply-devcontainer-changes %} For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/github/developing-online-with-codespaces/configuring-codespaces-for-your-project#apply-changes-to-your-configuration)."
|
||||
{% data reusables.codespaces.apply-devcontainer-changes %} For more information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)."
|
||||
|
||||
### Running your app from a codespace
|
||||
{% data reusables.codespaces.about-port-forwarding %} For more information, see "[Forwarding ports in your codespace](/github/developing-online-with-codespaces/forwarding-ports-in-your-codespace)."
|
||||
@@ -53,12 +53,4 @@ For more information on using {% data variables.product.prodname_vscode_shortnam
|
||||
|
||||
### Using the {% data variables.product.prodname_vscode_command_palette %}
|
||||
|
||||
The {% data variables.product.prodname_vscode_command_palette %} allows you to access and manage many features for {% data variables.product.prodname_codespaces %} and {% data variables.product.prodname_vscode_shortname %}. For more information, see "[Using the {% data variables.product.prodname_vscode_command_palette_shortname %} in {% data variables.product.prodname_codespaces %}](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces)."
|
||||
|
||||
## Navigating to an existing codespace
|
||||
|
||||
1. {% data reusables.codespaces.you-can-see-all-your-codespaces %}
|
||||
2. Click the name of the codespace you want to develop in.
|
||||

|
||||
|
||||
Alternatively, you can see any active codespaces for a repository by navigating to that repository and selecting **{% octicon "code" aria-label="The code icon" %} Code**. The drop-down menu will display all active codespaces for a repository.
|
||||
The {% data variables.product.prodname_vscode_command_palette %} allows you to access and manage many features for {% data variables.product.prodname_github_codespaces %} and {% data variables.product.prodname_vscode_shortname %}. For more information, see "[Using the {% data variables.product.prodname_vscode_command_palette_shortname %} in {% data variables.product.prodname_github_codespaces %}](/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces)."
|
||||
@@ -19,7 +19,7 @@ shortTitle: Forward ports
|
||||
|
||||
Port forwarding gives you access to TCP ports running within your codespace. For example, if you're running a web application on a particular port in your codespace, you can forward that port. This allows you to access the application from the browser on your local machine for testing and debugging.
|
||||
|
||||
When an application running inside a codespace prints output to the terminal that contains a localhost URL, such as `http://localhost:PORT` or `http://127.0.0.1:PORT`, the port is automatically forwarded. If you're using {% data variables.product.prodname_github_codespaces %} in the browser or in {% data variables.product.prodname_vscode %}, the URL string in the terminal is converted into a link that you can click to view the web page on your local machine. By default, {% data variables.product.prodname_codespaces %} forwards ports using HTTP.
|
||||
When an application running inside a codespace prints output to the terminal that contains a localhost URL, such as `http://localhost:PORT` or `http://127.0.0.1:PORT`, the port is automatically forwarded. If you're using {% data variables.product.prodname_github_codespaces %} in the browser or in {% data variables.product.prodname_vscode %}, the URL string in the terminal is converted into a link that you can click to view the web page on your local machine. By default, {% data variables.product.prodname_github_codespaces %} forwards ports using HTTP.
|
||||
|
||||

|
||||
|
||||
@@ -48,7 +48,7 @@ You can manually forward a port that wasn't forwarded automatically.
|
||||
|
||||
## Using HTTPS forwarding
|
||||
|
||||
By default, {% data variables.product.prodname_codespaces %} forwards ports using HTTP but you can update any port to use HTTPS, as needed.
|
||||
By default, {% data variables.product.prodname_github_codespaces %} forwards ports using HTTP but you can update any port to use HTTPS, as needed.
|
||||
|
||||
{% data reusables.codespaces.navigate-to-ports-tab %}
|
||||
1. Right click the port you want to update, then hover over **Change Port Protocol**.
|
||||
@@ -156,7 +156,7 @@ You can label a port to make the port more easily identifiable in a list.
|
||||
|
||||
## Adding a port to the codespace configuration
|
||||
|
||||
You can add a forwarded port to the {% data variables.product.prodname_github_codespaces %} configuration for the repository, so the port will automatically be forwarded for all codespaces created from the repository. After you update the configuration, any previously created codespaces must be rebuilt for the change to apply. For more information, see "[Configuring {% data variables.product.prodname_codespaces %} for your project](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project#applying-configuration-changes-to-a-codespace)."
|
||||
You can add a forwarded port to the {% data variables.product.prodname_github_codespaces %} configuration for the repository, so the port will automatically be forwarded for all codespaces created from the repository. After you update the configuration, any previously created codespaces must be rebuilt for the change to apply. For more information, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#applying-configuration-changes-to-a-codespace)."
|
||||
|
||||
You can manually configure forwarded ports in a `.devcontainer.json` file using the `forwardPorts` property, or you can use the "Ports" panel in your codespace.
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ We'll run all of the cells, in sequence, to perform all phases of building the i
|
||||
|
||||
### Open the image classifier notebook
|
||||
|
||||
The default container image that's used by {% data variables.product.prodname_github_codespaces %} includes a set of machine learning libraries that are preinstalled in your codespace. For example, Numpy, pandas, SciPy, Matplotlib, seaborn, scikit-learn, TensorFlow, Keras, PyTorch, Requests, and Plotly. For more information about the default image, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#using-the-default-dev-container-configuration)" and [the `devcontainers/images` repository](https://github.com/devcontainers/images/tree/main/src/codespaces#github-codespaces-default-linux-universal).
|
||||
The default container image that's used by {% data variables.product.prodname_github_codespaces %} includes a set of machine learning libraries that are preinstalled in your codespace. For example, Numpy, pandas, SciPy, Matplotlib, seaborn, scikit-learn, TensorFlow, Keras, PyTorch, Requests, and Plotly. For more information about the default image, see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#using-the-default-dev-container-configuration)" and [the `devcontainers/images` repository](https://github.com/devcontainers/images/tree/main/src/universal).
|
||||
|
||||
1. In the {% data variables.product.prodname_vscode_shortname %} editor, close any "Get Started" tabs that are displayed.
|
||||
1. Open the `image-classifier.ipynb` notebook file.
|
||||
@@ -75,7 +75,7 @@ Some software, such as TensorFlow, requires you to install NVIDIA CUDA to use yo
|
||||
1. Add a top-level `features` object with the following contents:
|
||||
|
||||
```json{:copy}
|
||||
“features”: {
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/nvidia-cuda:1": {
|
||||
"installCudnn": true
|
||||
}
|
||||
@@ -96,7 +96,7 @@ Some software, such as TensorFlow, requires you to install NVIDIA CUDA to use yo
|
||||
]
|
||||
}
|
||||
},
|
||||
“features”: {
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/nvidia-cuda:1": {
|
||||
"installCudnn": true
|
||||
}
|
||||
|
||||
@@ -9,10 +9,12 @@ topics:
|
||||
- Codespaces
|
||||
children:
|
||||
- /codespaces-lifecycle
|
||||
- /creating-a-codespace
|
||||
- /developing-in-a-codespace
|
||||
- /creating-a-codespace
|
||||
- /opening-an-existing-codespace
|
||||
- /using-source-control-in-your-codespace
|
||||
- /using-github-codespaces-for-pull-requests
|
||||
- /stopping-and-starting-a-codespace
|
||||
- /renaming-a-codespace
|
||||
- /deleting-a-codespace
|
||||
- /forwarding-ports-in-your-codespace
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
title: Opening an existing codespace
|
||||
intro: 'You can reopen a codespace that you have closed or stopped and return to your work.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Codespaces
|
||||
- Fundamentals
|
||||
- Developer
|
||||
shortTitle: Open an existing codespace
|
||||
---
|
||||
|
||||
You can reopen any of your active or stopped codespaces on {% data variables.product.prodname_dotcom_the_website %}, in {% data variables.product.prodname_vscode %}, or by using {% data variables.product.prodname_cli %}. You can't reopen a codespace that has been deleted. For more information, see "[{% data variables.product.prodname_codespaces %} lifecycle](/codespaces/developing-in-codespaces/codespaces-lifecycle)."
|
||||
|
||||
## Opening an existing codespace
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.codespaces.your-codespaces-procedure-step %}
|
||||
1. To open a codespace in your default editor, click the name of the codespace. {% data reusables.codespaces.about-changing-default-editor %} For more information, see "[Setting your default editor for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-default-editor-for-github-codespaces)."
|
||||
|
||||
To open the codespace in an editor other than your default, select the ellipsis (**...**) to the right of the codespace and click **Open in APPLICATION**.
|
||||
|
||||

|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.codespaces.using-codespaces-in-vscode %} For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-github-codespaces-in-visual-studio-code)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
1. In the {% data variables.product.prodname_vscode_shortname %} desktop application, open the Command Palette with <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Mac) or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> (Windows/Linux).
|
||||
1. Type "Codespaces" and select one of the following commands.
|
||||
- To open a codespace in a new window of {% data variables.product.prodname_vscode_shortname %}, select **Codespaces: Open Codespace in New Window**
|
||||
- To open a codespace in the web editor, select **Codespaces: Open in Browser**
|
||||
1. Click the codespace that you want to open.
|
||||
|
||||

|
||||
|
||||
You can also access the commands listed above by navigating to the Remote Explorer view in {% data variables.product.prodname_vscode_shortname %} and right-clicking the codespace that you want to open.
|
||||
|
||||

|
||||
|
||||
{% data reusables.codespaces.remote-explorer %}
|
||||
{% endvscode %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
1. In a terminal, enter one of the following {% data variables.product.prodname_cli %} commands.
|
||||
- To open a codespace in {% data variables.product.prodname_vscode_shortname %}, enter:
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace code
|
||||
```
|
||||
|
||||
- To open a codespace in the browser, enter:
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace code --web
|
||||
```
|
||||
|
||||
1. Using the arrow keys, navigate to the codespace that you want to open.
|
||||
1. To open the codespace, press <kbd>Enter</kbd>.
|
||||
|
||||
For more information, see [`gh codespace code`](https://cli.github.com/manual/gh_codespace_code) in the {% data variables.product.prodname_cli %} manual.
|
||||
|
||||
{% endcli %}
|
||||
@@ -0,0 +1,94 @@
|
||||
---
|
||||
title: Stopping and starting a codespace
|
||||
intro: 'You can stop and start your codespace to save resources and to pause work.'
|
||||
product: '{% data reusables.gated-features.codespaces %}'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Codespaces
|
||||
- Fundamentals
|
||||
- Developer
|
||||
shortTitle: Stop a codespace
|
||||
---
|
||||
|
||||
## About stopping and starting a codespace
|
||||
|
||||
{% data reusables.codespaces.stopping-a-codespace %}
|
||||
|
||||
Regardless of where you created or access your codespaces, you can view and manage them in your browser at https://github.com/codespaces.
|
||||
|
||||
## Stopping a codespace
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-codespaces-page %}
|
||||
1. To the right of the codespace you want to stop, click the elipsis (**...**).
|
||||
1. Click **Stop codespace**.
|
||||

|
||||
|
||||
{% endwebui %}
|
||||
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% data reusables.cli.cli-learn-more %}
|
||||
|
||||
To stop a codespace use the `gh codespace stop` subcommand and then choose the codespace you want to stop from the list that's displayed.
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace stop
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
|
||||
{% vscode %}
|
||||
|
||||
{% data reusables.vs-code.open-command-palette %}
|
||||
1. Type `stop` and select **Codespaces: Stop Codespace** from the list of options.
|
||||
1. In the list of codespaces, select the codespace you want to stop.
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
|
||||
## Restarting a codespace
|
||||
|
||||
{% webui %}
|
||||
|
||||
{% data reusables.codespaces.navigate-to-codespaces-page %}
|
||||
1. Click the name of the codespace you want to restart.
|
||||

|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
When you restart a codespace you can choose to open it in {% data variables.product.prodname_vscode %} or in your browser.
|
||||
|
||||
- To restart a codespace and open it in {% data variables.product.prodname_vscode %}, use the `gh codespace code` subcommand and then choose the codespace you want to restart from the list that's displayed.
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace code
|
||||
```
|
||||
|
||||
- To restart a codespace and open it in your browser, use the `gh codespace open --web` subcommand and then choose the codespace you want to restart from the list that's displayed.
|
||||
|
||||
```shell{:copy}
|
||||
gh codespace open --web
|
||||
```
|
||||
|
||||
{% endcli %}
|
||||
|
||||
|
||||
{% vscode %}
|
||||
|
||||
{% data reusables.vs-code.open-command-palette %}
|
||||
1. Type `connect` and select **Codespaces: Connect to Codespace** from the list of options.
|
||||
1. In the list of codespaces, select the codespace you want to restart.
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
## Further reading
|
||||
- "[Codespaces lifecycle](/codespaces/developing-in-codespaces/codespaces-lifecycle)"
|
||||
@@ -21,15 +21,15 @@ redirect_from:
|
||||
|
||||
- [Create a pull request](/codespaces/developing-in-codespaces/using-source-control-in-your-codespace#raising-a-pull-request) - Using either the Terminal and Git commands or the Source Control view, you can create pull requests just as you would on {% data variables.product.prodname_dotcom_the_website %}. If the repository uses a pull request template, you'll be able to use this within the Source Control view.
|
||||
- [Open a pull request](#opening-a-pull-request-in-codespaces) – You can open an existing pull request in a codespace, provided you have codespace access to the branch that is being merged in.
|
||||
- [Review a pull request](#reviewing-a-pull-request-in-codespaces) - Once you have opened a pull request in a codespace, you can use the "GitHub Pull Request" view to add review comments and approve pull requests. You can also use {% data variables.product.prodname_codespaces %} to [view review comments](#view-comments-from-a-review-in-codespaces).
|
||||
- [Review a pull request](#reviewing-a-pull-request-in-codespaces) - Once you have opened a pull request in a codespace, you can use the "GitHub Pull Request" view to add review comments and approve pull requests. You can also use {% data variables.product.prodname_github_codespaces %} to [view review comments](#view-comments-from-a-review-in-codespaces).
|
||||
|
||||
## Opening a pull request in {% data variables.product.prodname_codespaces %}
|
||||
|
||||
{% data reusables.repositories.sidebar-pr %}
|
||||
|
||||
2. In the list of pull requests, click the pull request you'd like to open in {% data variables.product.prodname_codespaces %}.
|
||||
3. On the right-hand side of your screen, click **{% octicon "code" aria-label="The code icon" %} Code**.
|
||||
4. In the {% data variables.product.prodname_codespaces %} tab, click **Create codespace on BRANCH**.
|
||||
1. In the list of pull requests, click the pull request you'd like to open in {% data variables.product.prodname_github_codespaces %}.
|
||||
1. On the right-hand side of your screen, click **{% octicon "code" aria-label="The code icon" %} Code**.
|
||||
1. In the {% data variables.product.prodname_codespaces %} tab, click **Create codespace on BRANCH**.
|
||||

|
||||
|
||||
## Reviewing a pull request in {% data variables.product.prodname_codespaces %}
|
||||
|
||||
@@ -21,7 +21,7 @@ shortTitle: Visual Studio Code
|
||||
|
||||
## About {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}
|
||||
|
||||
You can use your local install of {% data variables.product.prodname_vscode %} to create, manage, work in, and delete codespaces. To use {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode_shortname %}, you need to install the {% data variables.product.prodname_codespaces %} extension. For more information on setting up Codespaces in {% data variables.product.prodname_vscode_shortname %}, see "[Prerequisites](#prerequisites)."
|
||||
You can use your local install of {% data variables.product.prodname_vscode %} to create, manage, work in, and delete codespaces. {% data reusables.codespaces.using-codespaces-in-vscode %} For more information on setting up {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode_shortname %}, see "[Prerequisites](#prerequisites)."
|
||||
|
||||
By default, if you create a new codespace on {% data variables.product.prodname_dotcom_the_website %}, it will open in the browser. If you would prefer to open any new codespaces in {% data variables.product.prodname_vscode_shortname %} automatically, you can set your default editor to be {% data variables.product.prodname_vscode_shortname %}. For more information, see "[Setting your default editor for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-default-editor-for-github-codespaces)."
|
||||
|
||||
@@ -29,9 +29,9 @@ If you prefer to work in the browser, but want to continue using your existing {
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To develop in a codespace directly in {% data variables.product.prodname_vscode_shortname %}, you must install and sign into the {% data variables.product.prodname_codespaces %} extension with your {% data variables.product.product_name %} credentials. The {% data variables.product.prodname_codespaces %} extension requires {% data variables.product.prodname_vscode_shortname %} October 2020 Release 1.51 or later.
|
||||
To develop in a codespace directly in {% data variables.product.prodname_vscode_shortname %}, you must install and sign into the {% data variables.product.prodname_github_codespaces %} extension with your {% data variables.product.product_name %} credentials. The {% data variables.product.prodname_github_codespaces %} extension requires {% data variables.product.prodname_vscode_shortname %} October 2020 Release 1.51 or later.
|
||||
|
||||
Use the {% data variables.product.prodname_vscode_marketplace %} to install the [{% data variables.product.prodname_codespaces %}](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension. For more information, see [Extension Marketplace](https://code.visualstudio.com/docs/editor/extension-gallery) in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
Use the {% data variables.product.prodname_vscode_marketplace %} to install the [{% data variables.product.prodname_github_codespaces %}](https://marketplace.visualstudio.com/items?itemName=GitHub.codespaces) extension. For more information, see [Extension Marketplace](https://code.visualstudio.com/docs/editor/extension-gallery) in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
|
||||
|
||||
{% mac %}
|
||||
@@ -39,7 +39,7 @@ Use the {% data variables.product.prodname_vscode_marketplace %} to install the
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
1. Click **Sign in to view {% data variables.product.prodname_dotcom %}...**.
|
||||
|
||||

|
||||

|
||||
|
||||
2. To authorize {% data variables.product.prodname_vscode_shortname %} to access your account on {% data variables.product.product_name %}, click **Allow**.
|
||||
3. Sign in to {% data variables.product.product_name %} to approve the extension.
|
||||
@@ -51,11 +51,11 @@ Use the {% data variables.product.prodname_vscode_marketplace %} to install the
|
||||
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
|
||||
1. Use the "REMOTE EXPLORER" drop-down, then click **{% data variables.product.prodname_github_codespaces %}**.
|
||||
|
||||

|
||||

|
||||
|
||||
1. Click **Sign in to view {% data variables.product.prodname_codespaces %}...**.
|
||||
|
||||

|
||||

|
||||
|
||||
1. To authorize {% data variables.product.prodname_vscode_shortname %} to access your account on {% data variables.product.product_name %}, click **Allow**.
|
||||
1. Sign in to {% data variables.product.product_name %} to approve the extension.
|
||||
@@ -78,28 +78,15 @@ Use the {% data variables.product.prodname_vscode_marketplace %} to install the
|
||||
|
||||
{% data reusables.codespaces.codespaces-machine-types %} You can change the machine type of your codespace at any time.
|
||||
|
||||
1. In {% data variables.product.prodname_vscode_shortname %}, open the Command Palette (`shift command P` / `shift control P`).
|
||||
1. Search for and select "Codespaces: Change Machine Type."
|
||||
{% note %}
|
||||
|
||||

|
||||
**Note**: {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
1. Click the codespace that you want to change.
|
||||
{% endnote %}
|
||||
|
||||

|
||||
{% data reusables.codespaces.changing-machine-type-in-vscode %}
|
||||
|
||||
1. Choose the machine type you want to use.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.codespaces.codespaces-machine-type-availability %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
1. If the codespace is currently running, a message is displayed asking if you would like to restart and reconnect to your codespace now.
|
||||
|
||||
Click **Yes** if you want to change the machine type used for this codespace immediately.
|
||||
|
||||
If you click **No**, or if the codespace is not currently running, the change will take effect the next time the codespace restarts.
|
||||
{% data reusables.codespaces.about-changing-storage-size %}
|
||||
|
||||
## Deleting a codespace in {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
@@ -107,10 +94,10 @@ Use the {% data variables.product.prodname_vscode_marketplace %} to install the
|
||||
|
||||
## Switching to the Insiders build of {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
You can use the [Insiders Build of {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/setup/setup-overview#_insiders-nightly-build) within {% data variables.product.prodname_codespaces %}.
|
||||
You can use the [Insiders Build of {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/setup/setup-overview#_insiders-nightly-build) within {% data variables.product.prodname_github_codespaces %}.
|
||||
|
||||
1. In bottom left of your {% data variables.product.prodname_codespaces %} window, select **{% octicon "gear" aria-label="The settings icon" %} Settings**.
|
||||
1. In bottom left of your {% data variables.product.prodname_github_codespaces %} window, select **{% octicon "gear" aria-label="The settings icon" %} Settings**.
|
||||
2. From the list, select "Switch to Insiders Version".
|
||||
|
||||

|
||||
3. Once selected, {% data variables.product.prodname_codespaces %} will continue to open in Insiders Version.
|
||||

|
||||
3. Once selected, {% data variables.product.prodname_github_codespaces %} will continue to open in Insiders Version.
|
||||
|
||||
@@ -19,7 +19,7 @@ redirect_from:
|
||||
|
||||
{% data reusables.cli.about-cli %} For more information, see "[About {% data variables.product.prodname_cli %}](/github-cli/github-cli/about-github-cli)."
|
||||
|
||||
You can work with {% data variables.product.prodname_codespaces %} in the {% data variables.product.prodname_cli %} to:
|
||||
You can work with {% data variables.product.prodname_github_codespaces %} in the {% data variables.product.prodname_cli %} to:
|
||||
- [List all of your codespaces](#list-all-of-your-codespaces)
|
||||
- [Create a new codespace](#create-a-new-codespace)
|
||||
- [Stop a codespace](#stop-a-codespace)
|
||||
@@ -31,6 +31,7 @@ You can work with {% data variables.product.prodname_codespaces %} in the {% da
|
||||
- [Modify ports in a codespace](#modify-ports-in-a-codespace)
|
||||
- [Access codespace logs](#access-codespace-logs)
|
||||
- [Access remote resources](#access-remote-resources)
|
||||
- [Change the machine type of a codespace](#change-the-machine-type-of-a-codespace)
|
||||
|
||||
## Installing {% data variables.product.prodname_cli %}
|
||||
|
||||
@@ -40,7 +41,7 @@ You can work with {% data variables.product.prodname_codespaces %} in the {% da
|
||||
|
||||
If you have not already done so, run `gh auth login` to authenticate with your {% data variables.product.prodname_dotcom %} account.
|
||||
|
||||
To use `gh` to work with {% data variables.product.prodname_codespaces %}, type `gh codespace <COMMAND>` or its alias `gh cs <COMMAND>`.
|
||||
To use `gh` to work with {% data variables.product.prodname_github_codespaces %}, type `gh codespace <COMMAND>` or its alias `gh cs <COMMAND>`.
|
||||
|
||||
As an example of a series of commands you might use to work with {% data variables.product.prodname_github_codespaces %}, you could:
|
||||
|
||||
@@ -115,7 +116,7 @@ If you don't have any SSH keys, follow the instructions in "[Generating a new SS
|
||||
gh codespace code -c CODESPACE-NAME
|
||||
```
|
||||
|
||||
For more information, see "[Using {% data variables.product.prodname_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code)."
|
||||
For more information, see "[Using {% data variables.product.prodname_github_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code)."
|
||||
|
||||
### Open a codespace in JupyterLab
|
||||
|
||||
@@ -206,4 +207,12 @@ You can use the {% data variables.product.prodname_cli %} extension to create a
|
||||
|
||||
**Note**: The {% data variables.product.prodname_cli %} extension is currently in beta and subject to change.
|
||||
|
||||
{% endnote %}
|
||||
{% endnote %}
|
||||
|
||||
### Change the machine type of a codespace
|
||||
|
||||
```shell
|
||||
gh codespace edit -m <em>machine-type-name</em>
|
||||
```
|
||||
|
||||
For more information, see the "{% data variables.product.prodname_cli %}" tab of "[Changing the machine type for your codespace](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace)."
|
||||
Reference in New Issue
Block a user