# Connecting to your code locally

Connect GitHub Desktop to your account and clone your repository to edit files locally.

So far, you've worked in the browser. In this tutorial, you'll use GitHub Desktop to clone your repository to your computer so you can edit files in your own code editor.

> \[!NOTE]
> このシリーズに従う場合、 データ所在地付き GitHub Enterprise Cloud または GitHub Enterprise Serverを使用する場合は、 GitHub.com への参照とリンクを企業の専用 URL に置き換える必要があります。

## Prerequisites

* A `stargazers-log` repository. If you haven't created it yet, see [GitHubでのプロジェクトのリポジトリの作成](/ja/enterprise-server@3.17/get-started/start-your-journey/creating-a-repository-for-your-project-on-github).
* GitHub Desktop installed on your computer.

## Installing GitHub Desktop

If you don't have GitHub Desktop yet, install it before you continue. [Download GitHub Desktop](https://desktop.github.com/?ref_product=desktop\&ref_type=engagement\&ref_style=button).

> \[!TIP]
> GitHub Docs contains documentation for all of GitHub's plans, and where relevant, tools and operating systems. To find content that matches your setup, use the **Version** dropdown in the top left corner of an article to select your plan, and select the tool or operating system tabs below the article's introduction.

## Signing in to GitHub Desktop

Sign in so that GitHub Desktop can access your repositories.

1. Open GitHub Desktop.
2. From the welcome screen, click **Sign in to GitHub Enterprise**.
3. Follow the prompts to authenticate with your GitHub account and authorize the app.
4. Follow the steps to configure Git with your name and email address, which will be used for commits you make in GitHub Desktop.

If you don't see the welcome screen, follow the steps in [GitHub Desktop での基本設定の構成](/ja/desktop/configuring-and-customizing-github-desktop/configuring-basic-settings-in-github-desktop) to sign in and manage your settings from the GitHub Desktop menu.

## Cloning your repository

Cloning creates a copy of your repository on your computer that stays connected to the version on GitHub.

1. From the "Let's get started!" screen, select **`stargazers-log`** from the list of "Your repositories".
2. Directly below the repositories list, click **Clone OWNER/stargazers-log**, where OWNER is your GitHub personal account.
3. Accept the default repository URL and local path, and click **Clone**.

If you don't see the "Let's get started!" screen, follow the steps in [Cloning a repository](/ja/desktop/adding-and-cloning-repositories/cloning-and-forking-repositories-from-github-desktop#cloning-a-repository) to clone your `stargazers-log` repository.

## Opening your code in an editor

With your repository cloned, open it in a code editor to start working on the files.

1. In GitHub Desktop, select **Repository**, then click **Open in EDITOR**.
   * If you haven't set an editor yet, install one such as [Visual Studio Code](https://code.visualstudio.com/) (VS Code), then choose it in the **Advanced** section of GitHub Desktop settings.

2. Confirm that you can see your `index.html` and `README.md` files in the editor.

## What you accomplished

| Task                        | Outcome                                                               |
| --------------------------- | --------------------------------------------------------------------- |
| Signed in to GitHub Desktop | You connected GitHub Desktop to your account.                         |
| Cloned your repository      | You created a local copy of `stargazers-log` on your computer.        |
| Opened your code            | You opened the website files in a code editor, ready to make changes. |

## Next steps

* Now that your code is on your computer, build the first feature for your website. Continue to [コードの記述と格納](/ja/enterprise-server@3.17/get-started/start-your-journey/writing-and-storing-your-code).