From: Junio C Hamano Date: Wed, 07 Feb 2024 16:06:58 GMT Subject: Re: [PATCH] restore: allow --staged on unborn branch Message-ID: In-Reply-To: <20240206230357.1097505-2-shyamthakkar001@gmail.com> Ghanshyam Thakkar writes: > 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".