Re: New orphan worktree?
- From
Jim Hill <gjthill@gmail.com>
- Date
- Jan 6, 2021, 20:33 UTC
- Message-ID
- <CAEE75_3qtAwhVgHjvch4gMaF_7MTcRf=YzomeTYfpG6H=FB-5A@mail.gmail.com>
- In-Reply-To
- <CABPp-BHzPkZu=s=ssmcW=jxg3bOmbL2CkbiQn6N7-Dor8H0BaA@mail.gmail.com>
On Wed, Jan 6, 2021 at 11:48 AM Elijah Newren <newren@gmail.com> wrote:
> The rm command presumes the file-backend for refs. That might not > work in the future with reftable.
True dat. The pure way is
git worktree add newbranch $(git commit-tree `git mktree <&-` <&-)
git -C newbranch symbolic-ref HEAD refs/heads/newbranch