github / github/app

Warn when selected folder resolves to a parent Git repository root

Abierto
#719 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Requests and ideas
Lenguaje dominante
Sin datos de lenguaje
Estrellas
2.1k
Forks
153
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Feature summary

Warn users when a selected subfolder resolves to an (accidentally) initialized parent Git repo, causing Copilot to open the parent directory instead.

### What problem are you trying to solve?

When a user selects an empty or new folder that lives inside an existing Git repository, Copilot opens the parent repository root instead of the selected folder. This follows normal Git behavior, since the selected folder inherits the nearest parent `.git` directory, but the UX is surprising when the user does not realize the parent directory is a repository.

Example:
- User selects: `~/personal-projects/new-empty-folder`
- Parent repo exists at: `~/personal-projects/.git`
- Copilot opens session at: `~/personal-projects`

This can look like Copilot ignored the user’s folder selection. Honestly, this problem really only occurs if the user _forgets_ that the parent directory (`personal-projects`) was originally set up as a git repository...

### Proposed solution

When the selected folder resolves to a parent Git repository root that is different from the selected path, Copilot should explicitly acknowledge this before creating the session.

Suggested message:
> The folder you selected is inside an existing Git repository:
>
> Selected folder: `~/personal-projects/new-empty-folder`
> Repository root: `~/personal-projects`
>
> Copilot sessions are created at the repository root, so this session will open `~/personal-projects` instead.

### Workflow impact

This is especially confusing for common personal dev workflows where users keep many unrelated projects under a container directory like `~/personal-projects`, `~/code`, or `~/src`. If that container directory was _accidentally_ initialized as a Git repo, every new empty child folder appears to Copilot as part of the parent repo.

### Installation context

_No response_

### Additional context

_No response_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.