Objective
Reduce remote-branch noise in the T3 Code source-control picker for the personal tannerpolley/t3code fork while preserving the ability to select and work from intentionally retained remote branches.
This issue is for the tannerpolley/t3code fork only. It does not request an upstream pull request.
Verified current state
The local clone currently uses the personal fork as origin:
origin = https://github.com/tannerpolley/t3code.git
remote.origin.fetch = +refs/heads/*:refs/remotes/origin/*
The wildcard fetch refspec imports every branch that exists on the fork into local origin/* remote-tracking refs. This is the reason the T3 source-control picker can contain a large collection of origin/agent/*, archive, and other branches.
A fork and a clone should remain separate concepts:
- Keep the GitHub fork as
origin for pushes and personal branches.
- A clone is only the local checkout and is not a replacement for the fork.
- Add an
upstream remote only if upstream synchronization is needed.
- Git does not know which branches were personally authored; an inherited branch is still an
origin/* branch once it exists on the fork.
Requested plan and implementation
First inspect the current checkout, active worktrees, dirty state, default branch, and branches used by active agents. Do not prune or rewrite refspecs while doing so.
Then:
- Keep
origin pointed at tannerpolley/t3code.
- Replace the broad
+refs/heads/* fetch policy with an explicit allowlist of branches that the user actually needs, at minimum the default branch and any active feature branches.
- If an
upstream remote is introduced, fetch only its default branch unless the user explicitly adds more.
- Prune unselected local remote-tracking refs only after the retained branch list is confirmed.
- Preserve normal pushes, including
git push -u origin <new-branch>.
- Ensure automatic fetches do not reintroduce the wildcard refspec.
- Keep remote branch selection available in T3 for retained branches.
- Document the difference between:
- hiding remote branches in the T3 UI;
- stopping their local fetch;
- deleting branches from the GitHub fork.
- Do not delete any GitHub branch as part of this issue.
The existing T3 contract has local/remote/all ref filtering, but the current branch picker does not provide a useful allowlist or remote-name preference. Decide explicitly whether the smallest safe solution is Git configuration only, a T3 picker preference, or both. Do not add a UI abstraction if the Git refspec alone solves the user's problem.
Acceptance criteria
origin remains the personal fork and remains usable for pushes.
- The final
remote.origin.fetch configuration no longer fetches every branch through an unrestricted wildcard.
git branch -r contains only the retained origin/* tracking refs after pruning.
- The default branch and every active branch required by current work remain available.
- A newly created local branch can still be pushed with normal upstream tracking.
- T3's source-control picker continues to show local branches and intentionally retained remote branches.
- Refreshing T3 or running its normal fetch path does not restore the removed remote-tracking refs.
- No GitHub-hosted branches are deleted.
- Recovery instructions are recorded for adding another branch back to the fetch allowlist.
Non-goals
- Do not remove or recreate the GitHub fork.
- Do not change the upstream repository.
- Do not delete stale branches from GitHub.
- Do not modify unrelated T3 source-control behavior.
- Do not touch the active GitHub Issues implementation.
- Do not submit an upstream pull request.
Objective
Reduce remote-branch noise in the T3 Code source-control picker for the personal
tannerpolley/t3codefork while preserving the ability to select and work from intentionally retained remote branches.This issue is for the
tannerpolley/t3codefork only. It does not request an upstream pull request.Verified current state
The local clone currently uses the personal fork as
origin:The wildcard fetch refspec imports every branch that exists on the fork into local
origin/*remote-tracking refs. This is the reason the T3 source-control picker can contain a large collection oforigin/agent/*, archive, and other branches.A fork and a clone should remain separate concepts:
originfor pushes and personal branches.upstreamremote only if upstream synchronization is needed.origin/*branch once it exists on the fork.Requested plan and implementation
First inspect the current checkout, active worktrees, dirty state, default branch, and branches used by active agents. Do not prune or rewrite refspecs while doing so.
Then:
originpointed attannerpolley/t3code.+refs/heads/*fetch policy with an explicit allowlist of branches that the user actually needs, at minimum the default branch and any active feature branches.upstreamremote is introduced, fetch only its default branch unless the user explicitly adds more.git push -u origin <new-branch>.The existing T3 contract has local/remote/all ref filtering, but the current branch picker does not provide a useful allowlist or remote-name preference. Decide explicitly whether the smallest safe solution is Git configuration only, a T3 picker preference, or both. Do not add a UI abstraction if the Git refspec alone solves the user's problem.
Acceptance criteria
originremains the personal fork and remains usable for pushes.remote.origin.fetchconfiguration no longer fetches every branch through an unrestricted wildcard.git branch -rcontains only the retainedorigin/*tracking refs after pruning.Non-goals