Ghanshyam Thakkar <shyamthakkar001@xxxxxxxxx> 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".