(Had an agent checkout why my repos were so large and draft a request)
- 主要语言
- 没有语言数据
- 星标
- 2.1k
- 派生
- 153
- PR 合并指标
- 30 天内没有已合并 PR
描述
(Had an agent checkout why my repos were so large and draft a request)
Automatically garbage-collect Copilot checkpoint refs when sessions are archived
### Description
Copilot worktree sessions create large numbers of refs under `refs/copilot/checkpoints/*` and `refs/copilot-preserved/*`. These refs remain after sessions/worktrees are archived, preventing Git garbage collection and consuming significant disk space.
Please automatically clean up a session’s internal Git refs when that session is archived.
### Expected behavior
1. Preserve refs for active sessions and worktrees.
2. On archive, retain only the minimum snapshot needed to restore the session, or remove all internal refs if restoration does not require them.
3. Remove obsolete `refs/copilot/checkpoints//*` and related preserved refs.
4. Prune stale worktree metadata.
5. Run deferred Git maintenance (`reflog expire` and `git gc`) when safe.
6. Never delete user branches, remote refs, commits reachable from active sessions, or uncommitted work.
7. Provide a “Clean up archived session data” action for existing orphaned checkpoints.
### Motivation
In my repositories, archived Copilot sessions left tens of thousands of checkpoint refs. They retained approximately **1.3 GB** in one Android repository and **742 MB** in an iOS repository even after local branches were deleted. Manual ref deletion and Git garbage collection were required to reclaim the space.
---
| Field | Value |
| --- | --- |
| App version | 1.1.6 |
| OS | macOS 26.5.2 |
| Theme | Notionish |
| Path | /chat |
| Tenure | Week 6 |
贡献指南
调研方向
从 Copilot worktree 会话的归档流程以及 issue 中提到的内部 refs 开始:refs/copilot/checkpoints//* 和 refs/copilot-preserved/*。跟踪归档会话、worktree 元数据和请求的清理操作是如何表示的。完成的标准是在保留活动会话、用户 refs、可达提交和未提交工作的同时,安全回收已过时的归档数据。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git
- 领域
- desktop, tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100