Re: [PATCH] restore: allow --staged on unborn branch
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 7, 2024, 16:06 UTC
- Message-ID
- <xmqqle7wcl7h.fsf@gitster.g>
- In-Reply-To
- <20240206230357.1097505-2-shyamthakkar001@gmail.com>
Ghanshyam Thakkar <shyamthakkar001@gmail.com> writes:
Show 5 quoted lines
> Some users expect that being on an unborn branch is similar to having an > empty tree checked out. However, when running "git restore --staged ." > on unborn branch having staged changes, the follwing error gets printed, > > fatal: could not resolve HEAD
Sounds like a sensible behaviour---there is no HEAD so there is nothing to resolve. With "git resetore --staged ." in such a state, what did the user try to do? "git reset" (no other arguments)?
BTW, "follwing" -> "following".