pingdotgg / pingdotgg/t3code

[Feature]: Adopt an existing local Git checkout as a T3 Code project

Open
#11,860 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

accepted enhancement via-triage
Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Problem

T3 Code is oriented around creating projects by cloning or creating new
worktrees. There is no clear way to open an already-existing local checkout
and adopt it as a T3 Code project.

This affects:

  • repositories already cloned on the machine;
  • the repository's main checkout;
  • worktrees created by Git or another tool;
  • checkouts containing existing uncommitted work.

Without an adoption flow, users may create duplicate clones or project records,
making it easy to work in the wrong checkout. T3 Code should be able to attach
to the checkout that already exists.

Proposed solution

Add an Open existing checkout / Adopt existing project option alongside
the current clone/new-project flow.

The user should be able to:

  1. Select an existing local directory.
  2. Have T3 Code validate and resolve its Git repository root.
  3. See the detected branch, checkout path, and whether it is a worktree.
  4. Create a T3 Code project record pointing at that directory.
  5. Start threads in that checkout without cloning, moving, or creating another
    worktree.

The selected checkout should be allowed to contain uncommitted changes.

If the path or repository is already registered, T3 Code should focus or reuse
the existing project instead of creating a duplicate.

Removing the T3 Code project should remove only T3 Code's project record; it
must not delete or modify the checkout.

Expected behavior

An existing checkout should become usable in T3 Code without requiring:

  • git clone;
  • git worktree add;
  • moving the directory;
  • creating a duplicate project;
  • manually editing T3 Code state.

This is different from cloning a repository from a URL and different from
relinking a project after its directory has moved.

Related issues

  • #2357 — Enable renaming of project directories
  • #4940 — Moving a project folder reports an error and cannot be re-linked
  • #3753 / #3754 — Worktree handoff, focused on creating a new worktree

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the existing clone/new-project flow and trace how T3 Code validates checkouts and creates project records. Define the adoption flow around repository-root resolution, branch/worktree detection, duplicate registration, and preservation of uncommitted changes. Done means an existing checkout can be opened and used without cloning, moving, or creating another worktree, while project removal leaves the checkout unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, typescript
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.