Linus Torvalds <torvalds@xxxxxxxx> 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. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html