Skip to main content
설명서에 자주 업데이트를 게시하며 이 페이지의 번역이 계속 진행 중일 수 있습니다. 최신 정보는 영어 설명서를 참조하세요.

개요

리포지토리에 대한 개발 컨테이너 구성 파일에서 이를 설정합니다.

이 기능을 사용할 수 있는 사용자

People with write permissions to a repository can create or edit the codespace configuration.

Overview

If there's a particular file that's useful for people to see when they create a codespace for your repository, you can set this file to be opened automatically in the VS Code web client. You set this up in the dev container configuration file for your repository.

The file, or files, you specify are only opened the first time a codespace is opened in the web client. If the person closes the specified files, those files are not automatically reopened the next time that person opens or restarts the codespace.

Note: This automation only applies to the VS Code web client, not to the VS Code desktop application, or other supported editors.

Setting files to be opened automatically

  1. GitHub Codespaces for your repository may be configured in a devcontainer.json file. If your repository does not already contain a devcontainer.json file, you can add one now. See "Adding a dev container configuration to your repository."

  2. Edit the devcontainer.json file, adding a customizations.codespaces.openFiles property. The customizations property resides at the top level of the file, within the enclosing JSON object. For example:

    JSON
    "customizations": {
      "codespaces": {
        "openFiles": [
          "README.md",
          "scripts/tsconfig.json",
          "docs/main/CODING_STANDARDS.md"
        ]
      }
    }

    The value of the openFiles property is an array of one or more files in your repository. The paths are relative to the root of the repository (absolute paths are not supported). The files are opened in the web client in the order specified, with the first file in the array displayed in the editor.

  3. Save the file and commit your changes to the required branch of the repository.

Further reading