Own git worktree per session #44

Closed
opened 2026-10-11 23:26:50 -04:00 by jared · 0 comments
Owner

A new session on a git project can start in its own worktree: devdesk new NAME PROJECT --worktree, or the "own git worktree" checkbox in the New session form and dialog (shown only for git projects).

  • The worktree is $ROOT/.worktrees/PROJECT--NAME (hidden from the project list), on branch devdesk/NAME. The branch is made from the project's HEAD, or reused if it already exists.
  • The registry records worktree {path, repo, branch}. --list reports it, and projects carry git: true/false.
  • The session card shows "⑂ NAME".
  • Ending the session removes the worktree only when nothing in it is uncommitted, and deletes the branch only if it is merged (git branch -d). Otherwise both stay. The end dialog says so.
A new session on a git project can start in its own worktree: `devdesk new NAME PROJECT --worktree`, or the "own git worktree" checkbox in the New session form and dialog (shown only for git projects). - The worktree is `$ROOT/.worktrees/PROJECT--NAME` (hidden from the project list), on branch `devdesk/NAME`. The branch is made from the project's HEAD, or reused if it already exists. - The registry records `worktree {path, repo, branch}`. `--list` reports it, and projects carry `git: true/false`. - The session card shows "⑂ NAME". - Ending the session removes the worktree only when nothing in it is uncommitted, and deletes the branch only if it is merged (`git branch -d`). Otherwise both stay. The end dialog says so.
jared closed this issue 2026-10-11 23:28:13 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/devdesk#44