Answer: Create repository-scoped hook files under .github/hooks/ by making directories for your configuration, scripts, and logs, then add a hook configuration file at .github/hooks/copilot-cli-policy.json and commit the configuration and scripts (but not local audit logs). Status: Confirmed Entry: tool/github-copilot/admin-and-enterprise/set-up-repository-hook-files Revision: 3 Digest: sha256:09c2a21ccb291a17 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:33:10Z Last changed: 2026-11-19T13:08:48Z (commit message: — → Add Copilot CLI hook configuration) Last verified: 2026-11-20T13:15:06Z Next check: 2026-11-21T13:15:06Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of hook directory | .github/hooks/ | [1] | 2026-11-20 config file location | .github/hooks/copilot-cli-policy.json | [1] | 2026-11-20 config file discovery pattern | .github/hooks/*.json | [1] | 2026-11-20 directory creation command | mkdir -p .github/hooks/scripts | [1] | 2026-11-20 logs directory creation command | mkdir -p .github/hooks/logs | [1] | 2026-11-20 gitignore entry | .github/hooks/logs/ | [1] | 2026-11-20 commit command | git add .github/hooks/copilot-cli-policy.json .github/hooks/scripts | [1] | 2026-11-20 commit message | Add Copilot CLI hook configuration | [1] | 2026-11-20 Sources: [1] GitHub. "Rolling out Copilot CLI hooks for your teams - GitHub Docs". https://docs.github.com/en/copilot/tutorials/copilot-cli-hooks Role: primary. Accessed: 2026-11-20T13:15:06Z Quote: "you’ll use repository-scoped hooks stored in the repository under .github/hooks/" (Supports: hook directory) Quote: "Create a hook configuration file at .github/hooks/copilot-cli-policy.json ." (Supports: config file location) Quote: "Copilot agents load hook configurations from .github/hooks/*.json files in the repository." (Supports: config file discovery pattern) Quote: "mkdir -p .github/hooks/scripts" (Supports: directory creation command) Quote: "mkdir -p .github/hooks/logs" (Supports: logs directory creation command) Quote: "Add .github/hooks/logs/ to .gitignore so local audit logs aren’t committed:" (Supports: gitignore entry) Quote: "git add .github/hooks/copilot-cli-policy.json .github/hooks/scripts" (Supports: commit command) Quote: "git commit -m "Add Copilot CLI hook configuration"" (Supports: commit message) Snapshot SHA-256: f8bc9b4504be46c82f4ab2f6638a21f9a0f0c9452b9ebe6251ce4b57894be72b (captured 2026-11-18T13:11:33Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:11:33Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:15:06Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:15:06Z Last attempt: 2026-11-20T13:15:06Z Notes and limitations: Extracted automatically from a single official source (section "2. Set up repository hook files"). Related: https://latestn.com/tool/github-copilot/admin-and-enterprise/set-up-usage-budgets How do I set up budgets for GitHub Copilot usage-based billing in my organization or enterprise? https://latestn.com/tool/github-copilot/admin-and-enterprise/size-budgets-with-historical-data How do I size GitHub Copilot budgets using historical usage data? https://latestn.com/tool/github-copilot/admin-and-enterprise/span-attributes What span attributes does GitHub Copilot emit for invoke_agent, chat, and execute_tool spans? https://latestn.com/tool/github-copilot/admin-and-enterprise/set-model-access-baseline How do I set a baseline for GitHub Copilot model access in my enterprise? https://latestn.com/tool/github-copilot/admin-and-enterprise/set-up-dedicated-enterprise-copilot-business How do I set up a dedicated enterprise for GitHub Copilot Business only? https://latestn.com/tool/github-copilot/admin-and-enterprise/set-up-governance-repository How do I set up a governance repository for GitHub Copilot custom agents in my enterprise? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:08:48Z | changed | commit message: — → Add Copilot CLI hook configuration | [1] 2026-11-19T13:08:48Z | changed | logs directory creation command: — → mkdir -p .github/hooks/logs | [1] 2026-11-19T13:08:48Z | changed | directory creation command: — → mkdir -p .github/hooks/scripts | [1] 2026-11-19T13:08:48Z | changed | config file discovery pattern: — → .github/hooks/*.json | [1] 2026-11-19T13:08:48Z | changed | preToolUse timeout: 15 → — | [1] 2026-11-19T13:08:48Z | changed | sessionStart timeout: 10 → — | [1] 2026-11-19T13:08:48Z | changed | config file pattern: .github/hooks/*.json → — | [1] 2026-11-17T13:35:02Z | changed | preToolUse timeout: — → 15 | [1] 2026-11-17T13:35:02Z | changed | sessionStart timeout: — → 10 | [1] 2026-11-17T13:35:02Z | changed | config file pattern: — → .github/hooks/*.json | [1] 2026-11-17T13:35:02Z | changed | config file location: — → .github/hooks/copilot-cli-policy.json | [1] 2026-11-17T13:35:02Z | changed | commit message: Add Copilot CLI hook configuration → — | [1] 2026-11-17T13:35:02Z | changed | configuration file pattern: .github/hooks/*.json → — | [1] 2026-11-17T13:35:02Z | changed | configuration file location: .github/hooks/copilot-cli-policy.json → — | [1] 2026-11-13T03:33:10Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/github-copilot/admin-and-enterprise/set-up-repository-hook-files/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/github-copilot/admin-and-enterprise/set-up-repository-hook-files POST: https://latestn.com/dispute/tool/github-copilot/admin-and-enterprise/set-up-repository-hook-files with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/github-copilot/admin-and-enterprise/set-up-repository-hook-files?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I set up Copilot CLI hook files in a repository for my team? Revision 3, last verified 2026-11-20T13:15:06Z. https://latestn.com/tool/github-copilot/admin-and-enterprise/set-up-repository-hook-files (accessed 2026-11-21T09:58:55Z). @misc{LatestN_tool_github_copilot_admin_and_enterprise_set_up_repository_hook_files_r3, title = {How do I set up Copilot CLI hook files in a repository for my team?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/github-copilot/admin-and-enterprise/set-up-repository-hook-files}}, note = {Revision 3; digest sha256:09c2a21ccb291a17; last verified 2026-11-20T13:15:06Z; accessed 2026-11-21T09:58:55Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/github-copilot/admin-and-enterprise/set-up-repository-hook-files