Merge branch 'main' into jules-6785
This commit is contained in:
@@ -17,11 +17,11 @@ 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.
|
||||
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)."
|
||||
|
||||
If you choose to create a new codespace each time you work on a project, you should regularly push your changes so that any new commits are on {% data variables.product.prodname_dotcom %}. You can have up to 10 codespaces at a time. Once you have 10 codespaces, you must delete a codespace before you can create a new one. 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.
|
||||
|
||||
If you choose to use a long-running codespace for your project, you should pull from your repository's default branch each time you start working in your codespace so that your environment has the latest commits. This workflow is very similar to if you were working with a project on your local machine.
|
||||
If you choose to create a new codespace each time you work on a project, you should regularly push your changes so that any new commits are on {% data variables.product.prodname_dotcom %}. If you choose to use a long-running codespace for your project, you should pull from your repository's default branch each time you start working in your codespace so that your environment has the latest commits. This workflow is very similar to if you were working with a project on your local machine.
|
||||
|
||||
{% data reusables.codespaces.prebuilds-crossreference %}
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@ shortTitle: Create a codespace
|
||||
|
||||
You can create a codespace on {% data variables.product.prodname_dotcom_the_website %}, in {% data variables.product.prodname_vscode %}, or by using {% data variables.product.prodname_cli %}. {% data reusables.codespaces.codespaces-are-personal %}
|
||||
|
||||
Codespaces are associated with a specific branch of a repository and the repository cannot be empty. {% data reusables.codespaces.concurrent-codespace-limit %}
|
||||
|
||||
Codespaces are associated with a specific branch of a repository and the repository cannot be empty. You can create more than one codespace per repository or even per branch.
|
||||
|
||||
When you create a codespace, a number of steps happen to create and connect you to your development environment:
|
||||
|
||||
|
||||
@@ -16,15 +16,9 @@ topics:
|
||||
shortTitle: Delete a codespace
|
||||
---
|
||||
|
||||
There are costs associated with storing codespaces. You should therefore delete any codespaces you no longer need. For more information, see "[About billing for GitHub Codespaces](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)."
|
||||
|
||||
|
||||
{% data reusables.codespaces.concurrent-codespace-limit %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Only the person who created a codespace can delete it. There is currently no way for organization owners to delete codespaces created within their organization.
|
||||
|
||||
{% endnote %}
|
||||
{% data reusables.codespaces.max-number-codespaces %}
|
||||
|
||||
## Deleting a codespace
|
||||
|
||||
@@ -98,5 +92,36 @@ gh cs delete --repo octo-org/octo-repo --days 7
|
||||
|
||||
{% endcli %}
|
||||
|
||||
## Deleting codespaces in your organization
|
||||
|
||||
As an organization owner, you can use {% data variables.product.prodname_cli %} to delete any codespace in your organization.
|
||||
|
||||
{% webui %}
|
||||
|
||||
For more information, click the "{% data variables.product.prodname_cli %}" tab near the top of this page.
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
{% vscode %}
|
||||
|
||||
For more information, click the "{% data variables.product.prodname_cli %}" tab near the top of this page.
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% cli %}
|
||||
|
||||
1. Enter one of these commands to display a list of codespaces.
|
||||
* `gh codespace delete --org ORGANIZATION` - Lists the current codespaces in the specified organization.
|
||||
* `gh codespace delete --org ORGANIZATION --user USER` - Lists only those codespaces created by the specified user.
|
||||
You must be an owner of the specified organization.
|
||||
1. In the list of codespaces, navigate to the codespace you want to delete.
|
||||
1. To delete the selected codespace press <kbd>Enter</kbd>.
|
||||
|
||||
If the codespace contains unsaved changes you will be prompted to confirm deletion.
|
||||
|
||||
{% endcli %}
|
||||
|
||||
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)"
|
||||
Reference in New Issue
Block a user