Re: New orphan worktree?
- From
Jim Hill <gjthill@gmail.com>
- Date
- Jan 6, 2021, 22:25 UTC
- Message-ID
- <CAEE75_1o+A13+8SBeF9S0SN0ZaYhgK3D1bhbfWNWZWsj9jOXrw@mail.gmail.com>
- In-Reply-To
- <xmqqr1mxpv8n.fsf@gitster.c.googlers.com>
On Wed, Jan 6, 2021 at 2:15 PM Junio C Hamano <gitster@pobox.com> wrote:
> not a good example to support the use of the "--orphan" option.
I agree with that part, slathering infrastructure and abstractions on oneliners (okay, twoliners) is suspect in my book. worktree add, symoblic ref (really, no need to get lowlevel there, checkout --orphan does it) done. Tag an empty commit and the sequence gets closer to a legit oneliner
git worktree add foo empty; git -C foo checkout --orphan newbranch