github / github/app

(Had an agent checkout why my repos were so large and draft a request)

オープン
#2,709 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
言語のデータがありません
スター
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 |

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with the archive flow for Copilot worktree sessions and the internal refs named in the issue: refs/copilot/checkpoints//* and refs/copilot-preserved/*. Trace how archived sessions, worktree metadata, and the requested cleanup action are represented. Done means safely reclaiming obsolete archived data while preserving active sessions, user refs, reachable commits, and uncommitted work.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git
領域
desktop, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。