Skip to content

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

Description

@christhomas

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedenhancementRequested improvement or new capability.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions