Re: [PATCH v4] doc: checkout: rewrite detached HEAD state explanation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 12, 2026, 19:25 UTC
- Message-ID
- <xmqqik21j1ie.fsf@gitster.g>
- In-Reply-To
- <931a94e4-feab-49a9-b5c6-479f0d7f8b75@jvns.ca>
Julia Evans <julia@jvns.ca> writes:
Show 9 quoted lines
>> I guess it requires a developer's mindset and imagination to >> appreciate why detached HEAD is useful while spelunking. We often >> phrase the act of visiting random commits (often older ones) as >> "sight-seeing", but in reality, even when you are mostly looking, >> you do want to futz with things you see there. > > I'm not sure what you mean by "it requires a developer's mindset", in my > time working as a developer using Git I never ran into a case where I > would have needed to clobber a branch in this way :)
Sightseeing is not just going to look and see, but touching and breaking things. That kind of curiosity was what I meant by a developer's mindset.
And of course, I never ran into a case where I needed to clobber a branch, either. That is why I do not work on other people's topic branches to begin with, and make use of detached HEAD instead.
In any case, now we have a shared better understanding of where "where your current work started" and "will be the parent of your next commit" came from. Hopefully the next iteration will become clearer on these points? I think the central difference is that you seem to consider detached HEAD state is only about pure sightseeing while it was designed to allow touching and breaking. If the user is not making any changes, of course it does not make sense to talk about "your current changes" or "next commit". But detached HEAD is not limited to such a world view.
Thanks.