Re: New orphan worktree?
- From
Elijah Newren <newren@gmail.com>
- Date
- Jan 6, 2021, 19:48 UTC
- Message-ID
- <CABPp-BHzPkZu=s=ssmcW=jxg3bOmbL2CkbiQn6N7-Dor8H0BaA@mail.gmail.com>
- In-Reply-To
- <CAEE75_1fnvzOid-xfNOtd0eZfh_y8QizfLGAP_ceOeTQdJy2tg@mail.gmail.com>
On Wed, Jan 6, 2021 at 9:05 AM Jim Hill <gjthill@gmail.com> wrote:
Show 8 quoted lines
> > On Wed, Jan 6, 2021 at 8:18 AM Stefan Monnier <monnier@iro.umontreal.ca> 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.