Project Files tree incorrectly applies parent repository .gitignore
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 65/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- git
研究方向
Look for the code that builds the Project Files tree, likely in a module handling file system navigation and .gitignore application. The issue is about precedence of .gitignore rules when a project is nested inside another repository. Start by finding where .gitignore files are read and applied, then trace how the current directory's repository is determined. Check for tests related to file tree filtering or .gitignore handling to understand the expected behavior.
由索引模型根據 Issue 內容生成。
描述
Short summary
When a project is nested inside another Git repository, the Project Files tree can apply the parent repository's .gitignore rules instead of the child project's rules. This hides most files from the tree.
Affected version or release
v1.1.23
Installation context
GitHub Copilot desktop app on Windows 11, local repository project/session.
What happened?
All my projects live under C:/Code, and I use that for cross-repo AI work and it's added to sidebar - that folder is a repo, with an ignore-almost-all .gitignore to version control high level docs and notes (exclude anything but 3 folders). Under it I have C:/Code/ProjectA, which is also added to the sidebar, and is a normally setup git repo, but if I try and open the files pane in it, it seems to be filtered by the C:/Code .gitignore (I can only see one folder, which is from the allowed ones in the parent .gitignore).
C:/Code is also the repo storage location configured in the settings.
Steps to reproduce
-
Create a Git repository at
C:\Code. -
Add a parent
.gitignorecontaining:* !docs/ !docs/** -
Place an independent Git repository at
C:\Code\ProjectA. -
Ensure the child repository contains normal source directories such as
src. -
Configure both
C:\CodeandC:\Code\ProjectAas local Copilot projects and configureC:/Codeas the central storage location. -
Open a Copilot session for
ProjectA. -
Open the Project Files tree.
-
Observe that only
docsor other parent-repository-visible paths are shown; child repository source files are missing. -
Close and reopen the session, then restart the app.
-
Observe that the incorrect tree remains.
Expected behavior
The local project .gitignore takes precedence over the root one.
Additional context
No response
- 主要語言
- 沒有語言資料
- 星號
- 2.1k
- 分支
- 157
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/app 的其他 Issue
-
triage
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 70/100
相似的 Issue
-
category:port-update
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
ActivityWatch/activitywatch#1464 · 1 個 reaction ·
維護者通常 1 天內回覆
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search results未關閉
難度 2/5 1-3 小時 新手友好度 78/100
bytedance/trae-agent#483 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 75/100
flathub/flathub#10377 · 1 個 reaction ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 78/100
kriasoft/oauth-callback#57 ·
維護者通常 1 天內回覆