From: Junio C Hamano Date: Wed, 10 Jan 2007 00:10:12 GMT Subject: Re: [PATCH] Detached HEAD (experimental) Message-ID: <7vd55nivx7.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds writes: > On Tue, 9 Jan 2007, Junio C Hamano wrote: >> >> Being able to test merge or even make commits without being on a >> branch is vastly useful. > > Yes. I think the detached head notion is really really important. I think > it was a mistake to not allow it initially, but hey, there were various > historical reasons, and the whole thing about how branches worked was a > bit up in the air. > > I would suggest a solution: > > - git checkout will refuse to switch AWAY from a detached head unless the > SHA1 of the detached head exactly matches some other branch. ... or an existing "ref^{commit}". > I'd love to see the detached HEAD series move into "master", but I do > think we should make sure that people can't drop their work easily by > mistake, and I think the above suggestion is both simple and workable. > > Comments? I agree with the "reachability is wrong -- you would lose the point in the middle" reasoning.