On Wed, Dec 9, 2020 at 2:27 AM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote: > What I was suggesting was that it might be the case that the only way > to solve this would be to store the location of the main worktree > somewhere within <repo> in some file, and then `git worktree list` > would consult that file to learn the location of the main worktree. > This is complicated by the fact that that file would have to be > updated automatically if the main worktree directory is ever moved. It > also needs to be done in such a way that it is easy for other Git > implementations to understand and not trip over. Not that it matters because I don't do Git anymore. But when I was doing this I imagined unify main and secondary worktrees. When you switch from single to multiple worktrees, there is no main worktree anymore. The place that is main worktree still has your files, but it has the same status and treatment as any other worktree. And the repo is tucked away somewhere safe. -- Duy