github / github/app

Collection new-session flow treats parent folder as a Git repository

Đang mở
#3,286 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Affected version
GitHub Copilot app 1.1.14 on macOS 26.6.2.

## What happened?
A parent folder with no `.git` directory contains three direct child Git repositories, all on `main`. After adding the parent through **Projects -> + -> Open folder**, the app correctly registers it as a collection.

Opening **New session** for the collection shows generic single-repository controls (Project: collection name, Workspace: New worktree, Branch: main). The child repositories are not listed, so their branches and checkout modes cannot be selected.

Logs show the branch resolver targeting the non-Git parent:

```
Failed to get current branch path=~/gitrepos/spec-forge-all
error=git ["symbolic-ref", "HEAD"] failed:
fatal: not a git repository (or any of the parent directories): .git
```

The same failure occurs for `git worktree list`, `for-each-ref`, and `git fetch` against the parent.

## Steps to reproduce
1. Create a parent folder containing multiple direct child Git repositories, with no `.git` at the parent.
2. Add the parent using **Projects -> + -> Open folder**.
3. Click **New session** for the collection.
4. Observe one branch selector for the parent and no child-repository list.

## Expected behavior
Enumerate collection members and allow branch/checkout selection for each child. Run Git branch commands against each child, not the parent folder.

## Additional context
**Local repository** is a partial workaround but does not restore isolated multi-repository worktrees or per-repository branch selection. Related but narrower: #786 covers per-repository default branches.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách theo dõi flow New session cho một collection và branch resolver được hiển thị trong logs, sau đó tái hiện với một thư mục cha chứa ba repository con trực tiếp và không có thư mục .git ở thư mục cha. Hoàn tất khi các repository con được liệt kê cùng các lựa chọn branch và checkout cho từng repository, đồng thời các lệnh Git branch, worktree, ref và fetch được chạy trên từng repository con thay vì repository cha.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
git
Lĩnh vực
desktop, tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
72/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.