On Wed, Jan 6, 2021 at 9:05 AM Jim Hill <gjthill@xxxxxxxxx> wrote: > > On Wed, Jan 6, 2021 at 8:18 AM Stefan Monnier <monnier@xxxxxxxxxxxxxxxx> wrote: > > create a new orphan branch with a new matching worktree > > There's a much shorter sequence > > git worktree add -b new new $(git commit-tree `git mktree <&-` <&-) > rm .git/refs/heads/new The rm command presumes the file-backend for refs. That might not work in the future with reftable.