Re: [PATCH/RFC v2 0/7] Introduce new commands switch-branch and checkout-files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 30, 2018, 01:47 UTC
- Message-ID
- <xmqqk1kvmj3k.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CACsJy8Cv9ZwWEs-wsOtms3JCXo7x8fL_PBatcb0TgvrrQuMUdg@mail.gmail.com>
Duy Nguyen <pclouds@gmail.com> writes:
Show 10 quoted lines
> On Wed, Nov 28, 2018 at 9:01 PM Duy Nguyen <pclouds@gmail.com> wrote: >> should we do >> something about detached HEAD in this switch-branch command (or >> whatever its name will be)? >> >> This is usually a confusing concept to new users > > And it just occurred to me that perhaps we should call this "unnamed > branch" (at least at high UI level) instead of detached HEAD. It is > technically not as accurate, but much better to understand.
As I said elsewhere in nearby thread, I agree that "unnamed branch" is a reasonable way to explain what the state the user is in. It is not incorrect per-se that HEAD is detached from anything in refs/ in such a state, but that is an implementation detail of how the worktree gets on the unnamed branch (which lasts until the worktree next gets on a named branch, at which point the unnamed branch disappears).