리포지토리에서 제외할 콘텐츠 설정하기
리포지토리 설정을 사용하여 무시해야 하는 GitHub Copilot 리포지토리의 콘텐츠를 지정할 수 있습니다.
참고
GitHub Copilot 명령 줄 인터페이스 (CLI), Copilot 클라우드 에이전트및 IDE의 공동 파일럿 채팅 에이전트 모드는 콘텐츠 제외를 지원하지 않습니다. 이러한 Copilot 기능에 대한 자세한 내용은 [AUTOTITLE, AUTOTITLE](/copilot/concepts/agents/about-copilot-cli) 및 [AUTOTITLE](/copilot/concepts/agents/cloud-agent/about-cloud-agent)을 참조 [하세요](/copilot/how-tos/chat-with-copilot/chat-in-ide).
-
GitHub에서 리포지토리의 기본 페이지로 이동합니다.
-
리포지토리 이름 아래에서 Settings를 클릭합니다. "설정" 탭이 표시되지 않으면 드롭다운 메뉴를 선택한 다음 설정을 클릭합니다.

-
사이드바의 "코드 및 자동화" 섹션에서 Copilot 를 클릭한 다음 콘텐츠 제외를 클릭합니다.
해당 리포지토리가 상위 조직이나 동일 enterprise 소속 조직으로부터 제외 설정을 상속받았다면, 페이지 상단의 회색 상자를 통해 관련 상세 정보를 확인할 수 있습니다. 이 설정은 수정이 불가능합니다.
-
"이 리포지토리에서 제외할 경로" 다음 상자에 제외해야 하는 파일 Copilot 의 경로를 입력합니다.
형식
- "/PATH/TO/DIRECTORY/OR/FILE"을 사용하며, 각 경로는 별도의 줄에 표시됩니다. 줄 앞에#을 붙이면 메모를 작성할 수 있습니다.팁
fnmatch 패턴 일치 표기법을 사용하여 파일 경로를 지정할 수 있습니다. 패턴은 대/소문자를 구분하지 않습니다. ruby-doc.org 설명서의파일을 참조하세요.
리포지토리 설정에 지정된 경로 예시
# Ignore the `/src/some-dir/kernel.rs` file in this repository. - "/src/some-dir/kernel.rs" # Ignore files called `secrets.json` anywhere in this repository. - "secrets.json" # Ignore all files whose names begin with `secret` anywhere in this repository. - "secret*" # Ignore files whose names end with `.cfg` anywhere in this repository. - "*.cfg" # Ignore all files in or below the `/scripts` directory of this repository. - "/scripts/**"
- "/src/some-dir/kernel.rs"Ignore the /src/some-dir/kernel.rs file in this repository.
- "secrets.json"Ignore files called secrets.json anywhere in this repository.
- "secret*"Ignore all files whose names begin with secret anywhere in this repository.
- "*.cfg"Ignore files whose names end with .cfg anywhere in this repository.
- "/scripts/**"Ignore all files in or below the /scripts directory of this repository.
# Ignore the `/src/some-dir/kernel.rs` file in this repository.
- "/src/some-dir/kernel.rs"
# Ignore files called `secrets.json` anywhere in this repository.
- "secrets.json"
# Ignore all files whose names begin with `secret` anywhere in this repository.
- "secret*"
# Ignore files whose names end with `.cfg` anywhere in this repository.
- "*.cfg"
# Ignore all files in or below the `/scripts` directory of this repository.
- "/scripts/**"
조직의 콘텐츠 제외 구성하기
조직 설정을 사용하여 무시해야 하는 GitHub Copilot 파일을 지정할 수 있습니다. 파일은 Git 리포지토리 내부에 위치하거나, Git의 관리 범위를 벗어난 로컬 파일 시스템 어디에든 존재할 수 있습니다.
-
GitHub의 오른쪽 위 모서리에서 프로필 사진을 클릭한 다음, Your organizations를 클릭합니다.
-
조직을 클릭하여 선택합니다.
-
조직 이름에서 설정을 클릭합니다. "설정" 탭이 표시되지 않으면 드롭다운 메뉴를 선택한 다음 설정을 클릭합니다.

-
왼쪽 사이드바에서 Copilot 를 클릭한 후 콘텐츠 제외를 클릭합니다.
-
"제외할 리포지토리 및 경로" 다음 상자에 제외해야 하는 Copilot 파일의 세부 정보를 입력합니다.
Git 리포지토리 내의 파일이나 다른 위치의 파일을 제외하려면
"*":을 입력한 후 제외할 파일의 경로를 입력합니다. 여러 파일 경로 패턴을 지정할 때는 각 패턴을 개별 줄에 입력하세요.Git 리포지 Copilot토리의 파일을 제외하려면 한 줄에 리포지토리에 대한 참조를 입력한 다음 리포지토리 내의 위치에 대한 경로와 각 경로를 별도의 줄에 입력합니다. 제외할 파일이 들어 있는 리포지토리를 참조하도록
REPOSITORY-REFERENCE을 다음 형식으로 대체하세요.REPOSITORY-REFERENCE: - "/PATH/TO/DIRECTORY/OR/FILE" - "/PATH/TO/DIRECTORY/OR/FILE" - ...여러 프로토콜을 통해 리포지토리에 접근할 수 있습니다. 다음 구문 중 원하는 구문을
REPOSITORY-REFERENCE사용할 수 있으며 Copilot 리포지토리가 로컬로 복제된 방법에 관계없이 일치합니다.http[s]://host.xz[:port]/path/to/repo.git/ git://host.xz[:port]/path/to/repo.git/ [user@]host.xz:path/to/repo.git/ ssh://[user@]host.xz[:port]/path/to/repo.git/리포지토리에 대해 무시할 경로의 계산에서
user@의:port및REPOSITORY-REFERENCE경로는 무시됩니다.Azure DevOps 경우
REPOSITORY-REFERENCE지정할 때 새(dev.azure.com) 또는 이전(visualstudio.com) 호스트 형식을 사용할 수 있으며, Copilot 리포지토리를 로컬로 복제하는 데 사용된 호스트에 관계없이 일치합니다.팁
fnmatch 패턴 일치 표기법을 사용하여 파일 경로를 지정할 수 있습니다. 패턴은 대/소문자를 구분하지 않습니다. ruby-doc.org 설명서의파일을 참조하세요.
조직 설정에서 리포지토리 및 경로 예시
# Ignore all `.env` files from all file system roots (Git and non-Git).
# For example, this excludes `REPOSITORY-PATH/.env` and also `/.env`.
# This could also have been written on a single line as:
#
# "*": ["**/.env"]
"*":
- "**/.env"
# In the `octo-repo` repository in this organization:
octo-repo:
# Ignore the `/src/some-dir/kernel.rs` file.
- "/src/some-dir/kernel.rs"
# In the `primer/react` repository on GitHub:
https://github.com/primer/react.git:
# Ignore files called `secrets.json` anywhere in this repository.
- "secrets.json"
# Ignore files called `temp.rb` in or below the `/src` directory.
- "/src/**/temp.rb"
# In the `copilot` repository of any GitHub organization:
git@github.com:*/copilot:
# Ignore any files in or below the `/__tests__` directory.
- "/__tests__/**"
# Ignore any files in the `/scripts` directory.
- "/scripts/*"
# In the `gitlab-org/gitlab-runner` repository on GitLab:
git@gitlab.com:gitlab-org/gitlab-runner.git:
# Ignore the `/main_test.go` file.
- "/main_test.go"
# Ignore any files with names beginning with `server` or `session` anywhere in this repository.
- "{server,session}*"
# Ignore any files with names ending with `.md` or `.mk` anywhere in this repository.
- "*.m[dk]"
# Ignore files directly within directories such as `packages` or `packaged` anywhere in this repository.
- "**/package?/*"
# Ignore files in or below any `security` directories, anywhere in this repository.
- "**/security/**"
"*":
- "**/.env"Ignore all .env files from all file system roots (Git and non-Git).
For example, this excludes REPOSITORY-PATH/.env and also /.env.
This could also have been written on a single line as:
"*": ["**/.env"]
octo-repo:In the octo-repo repository in this organization:
- "/src/some-dir/kernel.rs"Ignore the /src/some-dir/kernel.rs file.
https://github.com/primer/react.git:In the primer/react repository on GitHub:
- "secrets.json"Ignore files called secrets.json anywhere in this repository.
- "/src/**/temp.rb"Ignore files called temp.rb in or below the /src directory.
git@github.com:*/copilot:In the copilot repository of any GitHub organization:
- "/__tests__/**"Ignore any files in or below the /__tests__ directory.
- "/scripts/*"Ignore any files in the /scripts directory.
git@gitlab.com:gitlab-org/gitlab-runner.git:In the gitlab-org/gitlab-runner repository on GitLab:
- "/main_test.go"Ignore the /main_test.go file.
- "{server,session}*"Ignore any files with names beginning with server or session anywhere in this repository.
- "*.m[dk]"Ignore any files with names ending with .md or .mk anywhere in this repository.
- "**/package?/*"Ignore files directly within directories such as packages or packaged anywhere in this repository.
- "**/security/**"Ignore files in or below any security directories, anywhere in this repository.
# Ignore all `.env` files from all file system roots (Git and non-Git).
# For example, this excludes `REPOSITORY-PATH/.env` and also `/.env`.
# This could also have been written on a single line as:
#
# "*": ["**/.env"]
"*":
- "**/.env"
# In the `octo-repo` repository in this organization:
octo-repo:
# Ignore the `/src/some-dir/kernel.rs` file.
- "/src/some-dir/kernel.rs"
# In the `primer/react` repository on GitHub:
https://github.com/primer/react.git:
# Ignore files called `secrets.json` anywhere in this repository.
- "secrets.json"
# Ignore files called `temp.rb` in or below the `/src` directory.
- "/src/**/temp.rb"
# In the `copilot` repository of any GitHub organization:
git@github.com:*/copilot:
# Ignore any files in or below the `/__tests__` directory.
- "/__tests__/**"
# Ignore any files in the `/scripts` directory.
- "/scripts/*"
# In the `gitlab-org/gitlab-runner` repository on GitLab:
git@gitlab.com:gitlab-org/gitlab-runner.git:
# Ignore the `/main_test.go` file.
- "/main_test.go"
# Ignore any files with names beginning with `server` or `session` anywhere in this repository.
- "{server,session}*"
# Ignore any files with names ending with `.md` or `.mk` anywhere in this repository.
- "*.m[dk]"
# Ignore files directly within directories such as `packages` or `packaged` anywhere in this repository.
- "**/package?/*"
# Ignore files in or below any `security` directories, anywhere in this repository.
- "**/security/**"
엔터프라이즈의 콘텐츠 제외 구성하기
엔터프라이즈 소유자는 엔터프라이즈 설정을 사용하여 무시해야 하는 GitHub Copilot 파일을 지정할 수 있습니다. 파일은 Git 리포지토리 내부에 위치하거나, Git의 관리 범위를 벗어난 로컬 파일 시스템 어디에든 존재할 수 있습니다.
- 귀하의 기업으로 이동하세요. 예를 들어 GitHub.com의 Enterprises 페이지에서.
- 페이지 맨 위에서 AI 컨트롤을 클릭합니다.
- 사이드바에서 Copilot를 클릭하세요.
-
<svg version="1.1" width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-circle-slash" aria-label="circle-slash" role="img"><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM3.965 13.096a6.5 6.5 0 0 0 9.131-9.131ZM1.5 8a6.474 6.474 0 0 0 1.404 4.035l9.131-9.131A6.499 6.499 0 0 0 1.5 8Z"></path></svg>를 클릭합니다****. - 제외할 콘텐츠는 경로를 통해 지정할 수 있습니다. 이전 섹션인 귀하의 조직을 위한 콘텐츠 제외 설정을 참조하세요.
참고
엔터프라이즈 수준과 조직 수준에서 콘텐츠 제외를 설정하는 것의 주요 차이점은 엔터프라이즈 수준에서 설정된 규칙이 엔터프라이즈의 모든 Copilot 사용자에게 적용되는 반면 조직 소유자가 설정한 규칙은 해당 조직에서 좌석을 할당 Copilot 받은 사용자에게만 적용된다는 점입니다.
콘텐츠 제외 변경 내용 테스트
IDE를 활용하면 콘텐츠 제외 기능의 변경 사항이 의도대로 작동하는지 검증할 수 있습니다.
IDE에서 제외된 콘텐츠의 변경 사항을 전파하기
IDE에서 콘텐츠 제외를 추가하거나 변경한 설정이 적용되기까지는 최대 30분이 소요될 수 있습니다. 기다리고 싶지 않다면, 아래 안내에 따라 콘텐츠 제외 설정을 직접 새로고침할 수 있습니다.
- JetBrains IDE의 Visual Studio경우 애플리케이션을 닫았다가 다시 열어 콘텐츠 제외 설정을 다시 로드합니다.
- 의 경우 Visual Studio Code 다음 단계를 사용하여 콘텐츠 제외 설정을 다시 로드합니다.
- 명령 팔레트를 열기. 예를 들어 Shift+Command+P (Mac) / Ctrl+Shift+P (Windows/Linux).
- 다음을 입력합니다.
reload -
**개발자: Window 다시 로드**를 선택합니다.
-
**Vim/Neovim의 경우** 파일을 열 때마다 콘텐츠 제외 설정이 GitHub 자동으로 호출됩니다.
콘텐츠 제외 테스트
설정한 콘텐츠 제외 기능이 의도한 대로 동작하는지 검증할 수 있습니다.
- 우선 콘텐츠 제외 기능이 적용되지 않은 파일에서 정상적으로 작동하는지 점검합니다. 이 작업을 수행하려면:
- IDE에서 콘텐츠 제외 대상이 아닌 파일을 열어주세요.
- 일반적으로 인라인 제안을 생성할 수 있는 편집을 하십시오. 제안 사항이 제공되어야 합니다.
- 제외해야 할 파일들을 열어 동일한 방식으로 편집을 진행합니다. 제안 사항이 제공되어서는 안됩니다.
- 콘텐츠 제외를 공동 파일럿 채팅테스트하려면:
-
IDE에서 공동 파일럿 채팅 패널을 엽니다.
-
편집기에서 제외할 파일을 연 후 열려 있는 모든 다른 파일을 닫습니다.
-
현재 열려 있는 파일이 프롬프트의 컨텍스트 파일로 제대로 연결되어 있는지 점검하세요.
-
프롬프트
explain this file를 입력합니다.파일이 제외 공동 파일럿 채팅 된 경우 파일을 사용하여 응답을 생성할 수 없습니다. 파일은 '의 응답에 Copilot참조로 나열되지 않습니다.
-
REST API를 사용하여 콘텐츠 제외 관리
조직 소유자 및 엔터프라이즈 소유자는 REST API를 사용하여 프로그래밍 방식으로 콘텐츠 제외를 GitHub 관리할 수도 있습니다.
자세한 내용은 Copilot 콘텐츠 제외 관리를 위한 REST API 엔드포인트을(를) 참조하세요.