1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Apply suggestions from code review

Co-authored-by: hubwriter <hubwriter@github.com>
This commit is contained in:
Sophie
2022-08-18 15:27:52 +02:00
committed by GitHub
parent b716226e9f
commit 756ec43919

View File

@@ -20,18 +20,26 @@ Each codespace is assigned an auto-generated display name. If you have multiple
To find the display name of a codespace:
- On {% data variables.product.product_name %}, view your list of codespaces at https://github.com/codespaces.
![List of codespaces in GitHub](/assets/images/help/codespaces/codespaces-list-display-name.png)
- Click the Remote Explorer in the {% data variables.product.prodname_vscode %} desktop application, or the {% data variables.product.prodname_vscode_shortname %} web client. For example: `symmetrical space telegram` in the screenshot below.
![List of codespaces in GitHub](/assets/images/help/codespaces/codespaces-remote-explorer.png)
When you create a codespace, a unique name is also assigned to the codespace. The name is a combination of your {% data variables.product.company_short %} handle, the repository name, and some random characters. For example: `octocat-myrepo-gmc7`. You can't change this name.
![Screenshot of the list of codespaces in GitHub](/assets/images/help/codespaces/codespaces-list-display-name.png)
To find the unique name of a codespace:
- In the {% data variables.product.prodname_vscode %} desktop application, or the {% data variables.product.prodname_vscode_shortname %} web client, click the Remote Explorer. The display name is shown below the repository name. For example: `symmetrical space telegram` in the screenshot below.
* Use this {% data variables.product.prodname_cli %} command in a terminal on your local machine: `gh codespace list`.
* Use this command in the terminal of your codespace: `echo $CODESPACE_NAME`.
* Access the name in {% data variables.product.product_name %} on https://github.com/codespaces. The name is shown in a pop-up when you hover over the **Open in browser** option on https://github.com/codespaces.
![Codespace name shown on hover over](/assets/images/help/codespaces/find-codespace-name-github.png)
![Screenshot of the Remote Explorer in VS Code](/assets/images/help/codespaces/codespaces-remote-explorer.png)
- In a terminal window on your local machine, use this {% data variables.product.prodname_cli %} command: `gh codespace list`.
### Permanent codespace names
In addition to the display name, when you create a codespace, a permanent name is also assigned to the codespace. The name is a combination of your {% data variables.product.company_short %} handle, the repository name, and some random characters. For example: `octocat-myrepo-gmc7`. You can't change this name.
To find the permanent name of a codespace:
* On {% data variables.product.product_name %}, the permanent name is shown in a pop-up when you hover over the **Open in browser** option on https://github.com/codespaces.
![Screenshot of the codespace name shown on hover over](/assets/images/help/codespaces/find-codespace-name-github.png)
* In a codespace, use this command in the terminal: `echo $CODESPACE_NAME`.
* In a terminal window on your local machine, use this {% data variables.product.prodname_cli %} command: `gh codespace list`.
## Renaming a codespace
@@ -40,7 +48,7 @@ Changing the display name of a codespace can be useful if you have multiple code
To rename a codespace, use the `gh codespace edit` subcommand:
```shell
gh codespace edit -c <em>unique name of the codespace</em> -d <em>new display name</em>
gh codespace edit -c <em>permanent name of the codespace</em> -d <em>new display name</em>
```
In this example, replace `unique name of the codespace` with the unique name of the codespace. Replace `new display name` with the desired display name.
In this example, replace `permanent name of the codespace` with the permanent name of the codespace. Replace `new display name` with the desired display name.