Project Files tree incorrectly applies parent repository .gitignore
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- git
- Domain
- developer-experience, tooling
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- No language data
- Stars
- 2.1k
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/app
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
When using GPT-5. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
When `ls` is aliased to a single word such as `eza`, `znap pull` attempts to execute a bogus command Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
marlonrichert/zsh-snap#320 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BurntSushi/jiff#653 ·
-
The version checker's trailing attribute region has no control for a less-than inside a quoted value Openarea: dashboard area: tests bug perceived difficulty: 2 python
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Nitjsefnie-Harness-Commons/daedalus#1105 · 1 comment ·
-
awaiting-response backend bug documentation enhancement P2 platform/linux qa
Difficulty 2/5 1-3 hours Newbie friendliness 88/100