1
0
mirror of synced 2026-01-06 06:02:35 -05:00

remove unsupported language translations (#22552)

This commit is contained in:
Rachael Sewell
2021-11-02 18:11:42 -07:00
committed by GitHub
parent 2f8283a79f
commit 946ff638c8
16863 changed files with 0 additions and 789536 deletions

View File

@@ -1,60 +0,0 @@
---
title: Changing the machine type for your codespace
shortTitle: Changing the machine type
intro: 'You can change the type of machine that''s running your codespace, so that you''re using resources appropriate for work you''re doing.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
topics:
- Codespaces
---
## About machine types
{% note %}
**Note:** You can only select or change the machine type if you are a member of an organization using {% data variables.product.prodname_codespaces %} and are creating a codespace on a repository owned by that organization.
{% endnote %}
{% data reusables.codespaces.codespaces-machine-types %}
You can choose a machine type either when you create a codespace or you can change the machine type at any time after you've created a codespace.
For information on choosing a machine type when you create a codespace, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)." For information on changing the machine type within {% data variables.product.prodname_vscode %}, see "[Using {% data variables.product.prodname_codespaces %} in {% data variables.product.prodname_vscode %}](/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code#changing-the-machine-type-in-visual-studio-code)."
## Changing the machine type in {% data variables.product.prodname_dotcom %}
{% data reusables.codespaces.your-codespaces-procedure-step %}
The current machine type for each of your codespaces is displayed.
!['Your codespaces' list](/assets/images/help/codespaces/your-codespaces-list.png)
1. Click the ellipsis (**...**) to the right of the codespace you want to modify.
1. Click **Change machine type**.
!['Change machine type' menu option](/assets/images/help/codespaces/change-machine-type-menu-option.png)
1. Choose the required machine type.
2. Click **Update codespace**.
The change will take effect the next time your codespace restarts.
## Force an immediate update of a currently running codespace
If you change the machine type of a codespace you are currently using, and you want to apply the changes immediately, you can force the codespace to restart.
1. At the bottom left of your codespace window, click **{% data variables.product.prodname_codespaces %}**.
![Click '{% data variables.product.prodname_codespaces %}'](/assets/images/help/codespaces/codespaces-button.png)
1. From the options that are displayed at the top of the page select **Codespaces: Stop Current Codespace**.
!['Suspend Current Codespace' option](/assets/images/help/codespaces/suspend-current-codespace.png)
1. After the codespace is stopped, click **Restart codespace**.
![Click 'Resume'](/assets/images/help/codespaces/resume-codespace.png)

View File

@@ -1,112 +0,0 @@
---
title: Creating a codespace
intro: You can create a codespace for a branch in a repository to develop online.
product: '{% data reusables.gated-features.codespaces %}'
permissions: '{% data reusables.codespaces.availability %}'
redirect_from:
- /github/developing-online-with-github-codespaces/creating-a-codespace
- /github/developing-online-with-codespaces/creating-a-codespace
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
---
## About codespace creation
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 %} For more information, see "[Deleting a codespace](/github/developing-online-with-codespaces/deleting-a-codespace)."
When you create a codespace, a number of steps happen to create and connect you to your development environment:
- Step 1: VM and storage are assigned to your codespace.
- Step 2: Container is created and your repository is cloned.
- Step 3: You can connect to the codespace.
- Step 4: Codespace continues with post-creation setup.
For more information on what happens when you create a codespace, see "[Deep Dive](/codespaces/getting-started/deep-dive)."
{% data reusables.codespaces.use-visual-studio-features %}
{% data reusables.codespaces.you-can-see-all-your-codespaces %}
## Access to {% data variables.product.prodname_codespaces %}
{% data reusables.codespaces.availability %}
When you have access to {% data variables.product.prodname_codespaces %}, you'll see a "Codespaces" tab within the **{% octicon "code" aria-label="The code icon" %} Code** drop-down menu when you view a repository.
You'll have access to codespaces under the following conditions:
* You are a member of an organization that has enabled {% data variables.product.prodname_codespaces %} and set a spending limit.
* An organization owner has granted you access to {% data variables.product.prodname_codespaces %}.
* The repository is owned by the organization that has enabled {% data variables.product.prodname_codespaces %}.
{% note %}
**Note:** Individuals who have already joined the beta with their personal {% data variables.product.prodname_dotcom %} account will not lose access to {% data variables.product.prodname_codespaces %}, however {% data variables.product.prodname_codespaces %} for individuals will continue to remain in beta.
{% endnote %}
Organization owners can allow all members of the organization to create codespaces, limit codespace creation to selected organization members, or disable codespace creation. For more information about managing access to codespaces within your organization, see "[Enable Codespaces for users in your organization](/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization#enable-codespaces-for-users-in-your-organization)."
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)."
If you would like to create a codespace for a repository owned by your personal account or another user, and you have permission to create repositories in an organization that has enabled {% data variables.product.prodname_codespaces %}, you can fork user-owned repositories to that organization and then create a codespace for the fork.
## Creating a codespace
{% include tool-switcher %}
{% webui %}
{% data reusables.repositories.navigate-to-repo %}
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](/assets/images/help/codespaces/branch-drop-down.png)
3. Under the repository name, use the **{% octicon "code" aria-label="The code icon" %} Code** drop-down menu, and in the **Codespaces** tab, click {% octicon "plus" aria-label="The plus icon" %} **New codespace**.
![New codespace button](/assets/images/help/codespaces/new-codespace-button.png)
If you are a member of an organization and are creating a codespace on a repository owned by that organization, you can select the option of a different machine type. From the dialog, choose a machine type and then click **Create codespace**. ![Machine type choice](/assets/images/help/codespaces/choose-custom-machine-type.png)
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.creating-a-codespace-in-vscode %}
{% endvscode %}
{% cli %}
{% data reusables.cli.cli-learn-more %}
To create a new codespace, use the `gh codespace create` subcommand.
```shell
gh codespace create
```
You are prompted to choose a repository, a branch, and a machine type (if more than one is available).
Alternatively, you can use flags to specify some or all of the options:
```shell
gh codespace create -r <em>owner</em>/<em>repo</em> -b <em>branch</em> -m <em>machine-type</em>
```
Replace `owner/repo` with the repository identifier. Replace `branch` with the name of the branch, or the full SHA hash of the commit, that you want to be initially checked out in the codespace. If you use the `-r` flag without the `b` flag, the codespace is created from the default branch.
Replace `machine-type` with a valid identifier for an available machine type. Identifiers are strings such as: `basicLinux32gb` and `standardLinux32gb`. The type of machines that are available depends on the repository, your user account, and your location. If you enter an invalid or unavailable machine type, the available types are shown in the error message. If you omit this flag and more than one machine type is available you will be prompted to choose one from a list.
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_create).
{% endcli %}

View File

@@ -1,61 +0,0 @@
---
title: Deleting a codespace
intro: You can delete a codespace you no longer need.
product: '{% data reusables.gated-features.codespaces %}'
redirect_from:
- /github/developing-online-with-github-codespaces/deleting-a-codespace
- /github/developing-online-with-codespaces/deleting-a-codespace
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
---
{% 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 %}
{% include tool-switcher %}
{% 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**
![Delete button](/assets/images/help/codespaces/delete-codespace.png)
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.deleting-a-codespace-in-vscode %}
{% endvscode %}
{% cli %}
{% data reusables.cli.cli-learn-more %}
To delete a codespace use the `gh codespace delete` subcommand and then choose a codespace from the list that's displayed.
```shell
gh codespace delete
```
If you have unsaved changes, you'll be prompted to confirm deletion. You can use the `-f` flag to force deletion, avoiding this prompt.
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_delete).
{% endcli %}

View File

@@ -1,61 +0,0 @@
---
title: Developing in a codespace
intro: 'You can open a codespace on {% data variables.product.product_name %}, then develop using {% data variables.product.prodname_vscode %}''s features.'
product: '{% data reusables.gated-features.codespaces %}'
permissions: 'You can develop in codespaces you''ve created for repositories owned by organizations using {% data variables.product.prodname_team %} and {% data variables.product.prodname_ghe_cloud %}.'
redirect_from:
- /github/developing-online-with-github-codespaces/developing-in-a-codespace
- /github/developing-online-with-codespaces/developing-in-a-codespace
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
---
## About development with {% data variables.product.prodname_codespaces %}
{% data variables.product.prodname_codespaces %} provides you with the full development experience of {% data variables.product.prodname_vscode %}. {% data reusables.codespaces.use-visual-studio-features %}
![Codespace overview with annotations](/assets/images/help/codespaces/codespace-overview-annotated.png)
1. Side Bar - By default, this area shows your project files in the Explorer.
2. Activity Bar - This displays the Views and provides you with a way to switch between them. You can reorder the Views by dragging and dropping them.
3. Editor - This is where you edit your files. You can use the tab for each editor to position it exactly where you need it.
4. Panels - This is where you can see output and debug information, as well as the default place for the integrated Terminal.
5. Status Bar - This area provides you with useful information about your codespace and project. For example, the branch name, configured ports, and more.
For more information on using {% data variables.product.prodname_vscode %}, see the [User Interface guide](https://code.visualstudio.com/docs/getstarted/userinterface) in the {% data variables.product.prodname_vscode %} documentation.
{% 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)."
### Personalizing your codespace
{% data reusables.codespaces.about-personalization %} For more information, see "[Personalizing {% data variables.product.prodname_codespaces %} for your account](/codespaces/setting-up-your-codespace/personalizing-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)."
### 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)."
### Committing your changes
{% data reusables.codespaces.committing-link-to-procedure %}
### 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 %}. For more information, see "[Using the {% data variables.product.prodname_vscode_command_palette %} 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. ![Name of codespace](/assets/images/help/codespaces/click-name-codespace.png)
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.

View File

@@ -1,151 +0,0 @@
---
title: Forwarding ports in your codespace
intro: '{% data reusables.codespaces.about-port-forwarding %}'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
redirect_from:
- /github/developing-online-with-codespaces/forwarding-ports-in-your-codespace
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
shortTitle: Forward ports
---
## About forwarded 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 variable.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.
![Automatic port forwarding](/assets/images/help/codespaces/automatic-port-forwarding.png)
You can also forward a port manually, label forwarded ports, share forwarded ports with members of your organization, share forwarded ports publicly, and add forwarded ports to the codespace configuration.
## Forwarding a port
You can manually forward a port that wasn't forwarded automatically.
{% include tool-switcher %}
{% webui %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Under the list of ports, click **Add port**.
![Add port button](/assets/images/help/codespaces/add-port-button.png)
1. Type the port number or address, then press enter.
![Text box to type port button](/assets/images/help/codespaces/port-number-text-box.png)
## 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.
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Right click the port you want to update, then hover over **Change Port Protocol**. ![Option to change port protocol](/assets/images/help/codespaces/update-port-protocol.png)
1. Select the protocol needed for this port. The protocol that you select will be remembered for this port for the lifetime of the codespace.
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Under the list of ports, click **Add port**.
![Add port button](/assets/images/help/codespaces/add-port-button.png)
1. Type the port number or address, then press enter.
![Text box to type port button](/assets/images/help/codespaces/port-number-text-box.png)
{% endvscode %}
{% cli %}
{% data reusables.cli.cli-learn-more %}
To forward a port use the `gh codespace ports forward` subcommand. Replace `codespace-port:local-port` with the remote and local ports that you want to connect. After entering the command choose from the list of codespaces that's displayed.
```shell
gh codespace ports forward <em>codespace-port</em>:<em>local-port</em>
```
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_ports_forward).
To see details of forwarded ports enter `gh codespace ports` and then choose a codespace.
{% endcli %}
## Sharing a port
{% note %}
**Note:** You can only make a port private to an organization if your organization uses {% data variables.product.prodname_team %} or {% data variables.product.prodname_ghe_cloud %}. This feature is not currently available in the beta version of {% data variables.product.prodname_codespaces %}.
{% endnote %}
If you want to share a forwarded port with others, you can either make the port private to your organization or make the port public. After you make a port private to your organization, anyone in the organization with the port's URL can view the running application. After you make a port public, anyone who knows the URL and port number can view the running application without needing to authenticate.
{% include tool-switcher %}
{% webui %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Right click the port that you want to share, select the "Port Visibility" menu, then click **Private to Organization** or **Public**. ![Option to select port visibility in right-click menu](/assets/images/help/codespaces/make-public-option.png)
1. To the right of the local address for the port, click the copy icon. ![Copy icon for port URL](/assets/images/help/codespaces/copy-icon-port-url.png)
1. Send the copied URL to the person you want to share the port with.
{% endwebui %}
{% vscode %}
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Right click the port you want to share, then click **Make Public**. ![Option to make port public in right-click menu](/assets/images/help/codespaces/make-public-option.png)
1. To the right of the local address for the port, click the copy icon. ![Copy icon for port URL](/assets/images/help/codespaces/copy-icon-port-url.png)
1. Send the copied URL to the person you want to share the port with.
{% endvscode %}
{% cli %}
To change the visibility of a forwarded port, use the `gh codespace ports visibility` subcommand. {% data reusables.codespaces.port-visibility-settings %}
Replace `codespace-port` with the forwarded port number. Replace `setting` with `private`, `org`, or `public`. After entering the command choose from the list of codespaces that's displayed.
```shell
gh codespace ports visibility <em>codespace-port</em>:<em>setting</em>
```
You can set the visibility for multiple ports with one command. Например:
```shell
gh codespace ports visibility 80:private 3000:public 3306:org
```
For more information about this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_ports_visibility).
{% endcli %}
## Labeling a port
You can label a port to make the port more easily identifiable in a list.
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Hover over the port you want to label, then click the label icon. ![Label icon for port](/assets/images/help/codespaces/label-icon.png)
{% data reusables.codespaces.type-port-label %}
## Adding a port to the codespace configuration
You can add a forwarded port to the {% data variables.product.prodname_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-changes-to-your-configuration)."
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.
{% data reusables.codespaces.navigate-to-ports-tab %}
1. Right click the port you want to add to the codespace configuration, then click **Set Label and Update devcontainer.json**. ![Option to set label and add port to devcontainer.json in the right-click menu](/assets/images/help/codespaces/update-devcontainer-to-add-port-option.png)
{% data reusables.codespaces.type-port-label %}

View File

@@ -1,21 +0,0 @@
---
title: Developing in a codespace
intro: 'Create a codespace to get started with developing your project inside a dedicated cloud environment. You can use forwarded ports to run your application and even use codespaces inside {% data variables.product.prodname_vscode %}'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
topics:
- Codespaces
children:
- /creating-a-codespace
- /developing-in-a-codespace
- /using-source-control-in-your-codespace
- /using-codespaces-for-pull-requests
- /deleting-a-codespace
- /forwarding-ports-in-your-codespace
- /changing-the-machine-type-for-your-codespace
- /using-codespaces-in-visual-studio-code
- /using-codespaces-with-github-cli
---

View File

@@ -1,42 +0,0 @@
---
title: Using Codespaces for pull requests
shortTitle: Pull requests
intro: 'You can use {% data variables.product.prodname_codespaces %} in your development workflow to create pull requests, review pull requests, and address review comments.'
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
- Visual Studio Code
- Developer
---
## About pull requests in {% data variables.product.prodname_codespaces %}
{% data variables.product.prodname_codespaces %} provides you with many of the capabilities you might need to work with pull requests:
- [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).
## 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. From the {% data variables.product.prodname_codespaces %} tab, click **New codespace**. ![Option to open PR in a codespace](/assets/images/help/codespaces/open-with-codespaces-pr.png)
## Reviewing a pull request in {% data variables.product.prodname_codespaces %}
{% data reusables.codespaces.review-pr %}
For more information on reviewing a pull request, see "[Reviewing proposed changes in a pull request](/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)."
## View comments from a review in {% data variables.product.prodname_codespaces %}
Once you have received feedback on a pull request, you can [open it in a codespace](#opening-a-pull-request-in-codespaces) to see the [review comments](#reviewing-a-pull-request-in-codespaces). From there you can respond to comments, add reactions, or dismiss the review.
![Option to open PR in a codespace](/assets/images/help/codespaces/incorporating-codespaces.png)

View File

@@ -1,90 +0,0 @@
---
title: Using Codespaces in Visual Studio Code
intro: 'You can develop in your codespace directly in {% data variables.product.prodname_vscode %} by connecting the {% data variables.product.prodname_github_codespaces %} extension with your account on {% data variables.product.product_name %}.'
product: '{% data reusables.gated-features.codespaces %}'
redirect_from:
- /github/developing-online-with-codespaces/using-codespaces-in-visual-studio-code
- /github/developing-online-with-codespaces/connecting-to-your-codespace-from-visual-studio-code
- /github/developing-online-with-codespaces/using-codespaces-in-visual-studio
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
- Visual Studio Code
- Developer
shortTitle: Visual Studio Code
---
## Требования
To develop in a codespace directly in {% data variables.product.prodname_vscode %}, you must sign into the {% data variables.product.prodname_github_codespaces %} extension. The {% data variables.product.prodname_github_codespaces %} extension requires {% data variables.product.prodname_vscode %} October 2020 Release 1.51 or later.
Use the {% data variables.product.prodname_vs %} 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 %} documentation.
{% mac %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Click **Sign in to view {% data variables.product.prodname_dotcom %}...**.
![Signing in to view {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png)
3. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click **Allow**.
4. Sign in to {% data variables.product.product_name %} to approve the extension.
{% endmac %}
{% windows %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Use the "REMOTE EXPLORER" drop-down, then click **{% data variables.product.prodname_github_codespaces %}**.
![The {% data variables.product.prodname_codespaces %} header](/assets/images/help/codespaces/codespaces-header-vscode.png)
3. Click **Sign in to view {% data variables.product.prodname_codespaces %}...**.
![Signing in to view {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode.png)
4. To authorize {% data variables.product.prodname_vscode %} to access your account on {% data variables.product.product_name %}, click **Allow**.
5. Sign in to {% data variables.product.product_name %} to approve the extension.
{% endwindows %}
## Creating a codespace in {% data variables.product.prodname_vscode %}
{% data reusables.codespaces.creating-a-codespace-in-vscode %}
## Opening a codespace in {% data variables.product.prodname_vscode %}
{% data reusables.codespaces.click-remote-explorer-icon-vscode %}
2. Under "Codespaces", click the codespace you want to develop in.
3. Click the Connect to Codespace icon.
![The Connect to Codespace icon in {% data variables.product.prodname_vscode %}](/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png)
## Changing the machine type in {% data variables.product.prodname_vscode %}
{% 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 %}, open the Command Palette (`shift command P` / `shift control P`).
2. Search for and select "Codespaces: Change Machine Type."
![Searching for a branch to create a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/vscode-change-machine-type-option.png)
3. Click the codespace that you want to change.
![Searching for a branch to create a new {% data variables.product.prodname_codespaces %}](/assets/images/help/codespaces/vscode-change-machine-choose-repo.png)
4. Choose the machine type you want to use.
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.
## Deleting a codespace in {% data variables.product.prodname_vscode %}
{% data reusables.codespaces.deleting-a-codespace-in-vscode %}

View File

@@ -1,186 +0,0 @@
---
title: Using Codespaces with GitHub CLI
shortTitle: GitHub CLI
intro: 'You can work with {% data variables.product.prodname_github_codespaces %} directly from your command line by using `gh`, the {% data variables.product.product_name %} command line interface.'
product: '{% data reusables.gated-features.codespaces %}'
miniTocMaxHeadingLevel: 3
versions:
fpt: '*'
type: how_to
topics:
- Codespaces
- CLI
- Developer
---
## About {% data variables.product.prodname_cli %}
{% 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:
- [List your codespaces](#list-all-of-your-codespaces)
- [Create a codespace](#create-a-new-codespace)
- [Stop a codespace](#stop-a-codespace)
- [Delete a codespace](#delete-a-codespace)
- [SSH into a codespace](#ssh-into-a-codespace)
- [Open a codespace in {% data variables.product.prodname_vscode %}](#open-a-codespace-in-visual-studio-code)
- [Copying a file to/from a codespace](#copying-a-file-tofrom-a-codespace)
- [Modify ports in a codespace](#modify-ports-in-a-codespace)
- [Access codespace logs](#access-codespace-logs)
## Installing {% data variables.product.prodname_cli %}
{% data reusables.cli.cli-installation %}
## Using {% data variables.product.prodname_cli %}
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>`.
As an example of a series of commands you might use to work with {% data variables.product.prodname_github_codespaces %}, you could:
* List your current codespaces, to check whether you have a codespace for a particular repository:<br> `gh codespace list`
* Create a new codespace for the required repository branch:<br> `gh codespace create -r github/docs -b main`
* SSH into the new codespace:<br> `gh codespace ssh -c mona-github-docs-v4qxrv7rfwv9w`
* Forward a port to your local machine:<br> `gh codespace ports forward 8000:8000 -c mona-github-docs-v4qxrv7rfwv9w`
## `gh` commands for {% data variables.product.prodname_github_codespaces %}
The sections below give example commands for each of the available operations.
For a complete reference of `gh` commands for {% data variables.product.prodname_github_codespaces %}, including details of all available options for each command, see the {% data variables.product.prodname_cli %} online help for "[gh codespace](https://cli.github.com/manual/gh_codespace)." Alternatively, use `gh codespace [<SUBCOMMAND>...] --help` on the command line.
{% note %}
**Note**: The `-c <em>codespace-name</em>` flag, used with many commands, is optional. If you omit it a list of codespaces is displayed for you to choose from.
{% endnote %}
### List all of your codespaces
```shell
gh codespace list
```
The list includes the unique name of each codespace, which you can use in other `gh codespace` commands.
### Create a new codespace
```shell
gh codespace create -r <em>owner/repository</em> [-b <em>branch</em>]
```
For more information, see "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
### Stop a codespace
```shell
gh codespace stop -c <em>codespace-name</em>
```
For more information, see "[Deep dive into Codespaces](/codespaces/getting-started/deep-dive#closing-or-stopping-your-codespace)."
### Delete a codespace
```shell
gh codespace delete -c <em>codespace-name</em>
```
For more information, see "[Deleting a codespace](/codespaces/developing-in-codespaces/deleting-a-codespace)."
### SSH into a codespace
To run commands on the remote codespace machine, from your terminal, you can SSH into the codespace.
```shell
gh codespace ssh -c <em>codespace-name</em>
```
{% data variables.product.prodname_github_codespaces %} copies your GitHub SSH keys into the codespace on creation for a seamless authentication experience. You may be asked to enter the passphrase for your SSH key, after which you will get a command prompt from the remote codespace machine.
If you don't have any SSH keys, follow the instructions in "[Generating a new SSH key and adding it to the ssh-agent](/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)."
### Open a codespace in {% data variables.product.prodname_vscode %}
```shell
gh codespace code -c <em>codespace-name</em>
```
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)."
### Copy a file to/from a codespace
```shell
gh codespace cp [-r] <em>source(s)</em> <em>destination</em>
```
Use the prefix `remote:` on a file or directory name to indicate that it's on the codespace. As with the UNIX `cp` command, the first argument specifies the source and the last specifies the destination. If the destination is a directory, you can specify multiple sources. Use the `-r` (recursive) flag if any of the sources is a directory.
The location of files and directories on the codespace is relative to the home directory of the remote user.
#### Примеры
* Copy a file from the local machine to the `$HOME` directory of a codespace:
`gh codespace cp myfile.txt remote:`
* Copy a file to the directory in which a repository is checked out in a codespace:
`gh codespace cp myfile.txt remote:/workspaces/<REPOSITORY-NAME>`
* Copy a file from a codespace to the current directory on the local machine:
`gh codespace cp remote:myfile.txt .`
* Copy three local files to the `$HOME/temp` directory of a codespace:
`gh codespace cp a1.txt a2.txt a3.txt remote:temp`
* Copy three files from a codespace to the current working directory on the local machine:
`gh codespace cp remote:a1.txt remote:a2.txt remote:a3.txt .`
* Copy a local directory into the `$HOME` directory of a codespace:
`gh codespace cp -r mydir remote:`
* Copy a directory from a codespace to the local machine, changing the directory name:
`gh codespace cp -r remote:mydir mydir-localcopy`
For more information about the `gh codespace cp` command, including additional flags you can use, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_cp).
### Modify ports in a codespace
You can forward a port on a codespace to a local port. The port remains forwarded as long as the process is running. To stop forwarding the port, press <kbd>control</kbd>+<kbd>c</kbd>.
```shell
gh codespace ports forward <em>codespace-port-number</em>:<em>local-port-number</em> -c <em>codespace-name</em>
```
To see details of forwarded ports enter `gh codespace ports` and then choose a codespace.
You can set the visibility of a forwarded port. {% data reusables.codespaces.port-visibility-settings %}
```shell
gh codespace ports visibility <em>codespace-port</em>:<em>private|org|public</em> -c <em>codespace-name</em>
```
You can set the visibility for multiple ports with one command. Например:
```shell
gh codespace ports visibility 80:private 3000:public 3306:org -c <em>codespace-name</em>
```
For more information, see "[Forwarding ports in your codespace](/codespaces/developing-in-codespaces/forwarding-ports-in-your-codespace)."
### Access codespace logs
You can see the creation log for a codespace. After entering this command you will be asked to enter the passphrase for your SSH key.
```shell
gh codespace logs -c <em>codespace-name</em>
```
For more information about the creation log, see "[Codespaces logs](/codespaces/troubleshooting/codespaces-logs#creation-logs)."

View File

@@ -1,77 +0,0 @@
---
title: Using source control in your codespace
intro: After making changes to a file in your codespace you can quickly commit the changes and push your update to the remote repository.
product: '{% data reusables.gated-features.codespaces %}'
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
- Fundamentals
- Developer
shortTitle: Управление исходным кодом
---
## About source control in {% data variables.product.prodname_codespaces %}
You can perform all the Git actions you need directly within your codespace. For example, you can fetch changes from the remote repository, switch branches, create a new branch, commit and push changes, and create a pull request. You can use the integrated terminal within your codespace to enter Git commands, or you can click icons and menu options to complete all the most common Git tasks. This guide explains how to use the graphical user interface for source control.
Source control in {% data variables.product.prodname_github_codespaces %} uses the same workflow as {% data variables.product.prodname_vscode %}. For more information, see the {% data variables.product.prodname_vscode %} documentation "[Using Version Control in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support)."
A typical workflow for updating a file using {% data variables.product.prodname_github_codespaces %} would be:
* From the default branch of your repository on {% data variables.product.prodname_dotcom %}, create a codespace. See "[Creating a codespace](/codespaces/developing-in-codespaces/creating-a-codespace)."
* In your codespace, create a new branch to work on.
* Make your changes and save them.
* Commit the change.
* Raise a pull request.
## Creating or switching branches
{% data reusables.codespaces.create-or-switch-branch %}
{% tip %}
**Tip**: If someone has changed a file on the remote repository, in the branch you switched to, you will not see those changes until you pull the changes into your codespace.
{% endtip %}
## Pulling changes from the remote repository
You can pull changes from the remote repository into your codespace at any time.
{% data reusables.codespaces.source-control-display-dark %}
1. At the top of the side bar, click the ellipsis (**...**). ![Ellipsis button for View and More Actions](/assets/images/help/codespaces/source-control-ellipsis-button.png)
1. In the drop-down menu, click **Pull**.
If the dev container configuration has been changed since you created the codespace, you can apply the changes by rebuilding the container for the codespace. For more information, see "[Configuring Codespaces for your project](/codespaces/setting-up-your-codespace/configuring-codespaces-for-your-project#applying-changes-to-your-configuration)."
## Setting your codespace to automatically fetch new changes
You can set your codespace to automatically fetch details of any new commits that have been made to the remote repository. This allows you to see whether your local copy of the repository is out of date, in which case you may choose to pull in the new changes.
If the fetch operation detects new changes on the remote repository, you'll see the number of new commits in the status bar. You can then pull the changes into your local copy.
1. Click the **Manage** button at the bottom of the Activity Bar. ![Manage button](/assets/images/help/codespaces/manage-button.png)
1. In the menu, slick **Settings**.
1. On the Settings page, search for: `autofetch`. ![Search for autofetch](/assets/images/help/codespaces/autofetch-search.png)
1. To fetch details of updates for all remotes registered for the current repository, set **Git: Autofetch** to `all`. ![Enable Git autofetch](/assets/images/help/codespaces/autofetch-all.png)
1. If you want to change the number of seconds between each automatic fetch, edit the value of **Git: Autofetch Period**.
## Committing your changes
{% data reusables.codespaces.source-control-commit-changes %}
## Raising a pull request
{% data reusables.codespaces.source-control-pull-request %}
## Pushing changes to your remote repository
You can push the changes you've made. This applies those changes to the upstream branch on the remote repository. You might want to do this if you're not yet ready to create a pull request, or if you prefer to create a pull request on {% data variables.product.prodname_dotcom %}.
1. At the top of the side bar, click the ellipsis (**...**). ![Ellipsis button for View and More Actions](/assets/images/help/codespaces/source-control-ellipsis-button-nochanges.png)
1. In the drop-down menu, click **Push**.

View File

@@ -1,45 +0,0 @@
---
title: Web-based editor
intro: Use the web-based editor from your repository to create and commit code changes.
versions:
fpt: '*'
type: how_to
topics:
- Codespaces
- Visual Studio Code
- Developer
shortTitle: Web-based editor
---
{% note %}
**Note:** This web-based editor is currently in beta preview. You can provide feedback [in our Discussions](https://github.co/browser-editor-feedback).
{% endnote %}
## About the web-based editor
The web-based editor introduces a new, lightweight editing experience that runs entirely in your browser. With the web editor, you can navigate files and source code repositories from {% data variables.product.prodname_dotcom %}, and make and commit code changes. You can open any repository, fork, or pull request in the editor.
The web-based editor is available to everyone for free on {% data variables.product.prodname_dotcom_the_website %}.
The web-based editor provides many of the benefits of {% data variables.product.prodname_vscode %}, such as search, syntax highlighting, and a source control view. You can also use Settings Sync to share your own {% data variables.product.prodname_vscode %} settings with the editor. For more information, see the [Settings Sync guide](https://code.visualstudio.com/docs/editor/settings-sync) in the {% data variables.product.prodname_vscode %} documentation.
The web editor runsentirely in your browsers sandbox. It doesnt clone the repository, but instead loads your code by invoking the services' APIs directly from your browser. Your work is saved in the browsers local storage until you commit it. You can commit your changes topersist any newwork.
Because there is no associated compute, you wont be able to build and run your code or use the integrated terminal.Only a subset of extensions that can run in the web will appear in the Extensionspanel and can be installed. Likewise, support for certain programming languages may be more limited in the web.
## How to use the web-based editor
You can open any {% data variables.product.prodname_dotcom %} repository in the web-based editor in the following ways:
- Pressing the dot ( . ) key while browsing any repository on {% data variables.product.prodname_dotcom %}.
- Change the URL from "github.com" to "github.dev".
## Устранение проблем
If you have issues opening the web-based editor, try the following:
- Make sure you are signed in to {% data variables.product.prodname_dotcom %}.
- Disable any ad blockers.
- Use a non-incognito window in your browser to open the web-based editor.