From: Carl Worth Subject: Re: [PATCH] Detached HEAD (experimental) Date: Mon, 08 Jan 2007 16:43:00 -0800 Message-ID: <87fyalyqqz.wl%cworth@cworth.org> References: <7vac11yirf.fsf@assigned-by-dhcp.cox.net> <87ps9xgkjo.wl%cworth@cworth.org> <7virfprquo.fsf@assigned-by-dhcp.cox.net> <87odphgfzz.wl%cworth@cworth.org> <7vbql9ydd7.fsf@assigned-by-dhcp.cox.net> <20070108131735.GA2647@coredump.intra.peff.net> <7vzm8tt5kf.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Mon_Jan__8_16:42:54_2007-1"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Cc: Jeff King , git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Jan 09 01:45:06 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1H456p-0006Fo-P9 for gcvg-git@gmane.org; Tue, 09 Jan 2007 01:45:00 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750788AbXAIAo5 (ORCPT ); Mon, 8 Jan 2007 19:44:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750814AbXAIAo5 (ORCPT ); Mon, 8 Jan 2007 19:44:57 -0500 Received: from mx1.redhat.com ([66.187.233.31]:45657 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750788AbXAIAo4 (ORCPT ); Mon, 8 Jan 2007 19:44:56 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l090irjY026195; Mon, 8 Jan 2007 19:44:53 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l090irOO009846; Mon, 8 Jan 2007 19:44:53 -0500 Received: from raht.cworth.org (sebastian-int.corp.redhat.com [172.16.52.221]) by mail.boston.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l090iqhf031571; Mon, 8 Jan 2007 19:44:52 -0500 To: Junio C Hamano In-Reply-To: <7vzm8tt5kf.fsf@assigned-by-dhcp.cox.net> User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.4 Mule/5.0 (SAKAKI) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: --pgp-sign-Multipart_Mon_Jan__8_16:42:54_2007-1 Content-Type: text/plain; charset=US-ASCII On Mon, 08 Jan 2007 16:19:28 -0800, Junio C Hamano wrote: > The first checkout, because there is no branch v1.4.0, makes the > HEAD detached. You are no longer on any branch at that point, > and "git checkout v1.2.0" that follows do not trigger the check > which is about "coming back from the detached HEAD state". So what's the final check? Is it "can come from detached HEAD to a branch only if the detached HEAD is reachable from the target branch"? If so, that's still a trap for people who are just exploring with "git checkout" and never make any commits while detached. > But I would probably do the second v1.2.0 "checkout" with "git > reset --hard", if what I am doing is "wandering, looking around > to see different commits". You would probably do this, yes, but is it what you would recommend in a tutorial for new users doing read-only exploration of old versions of some piece of software? One of the main reasons I'm interested in the "detached head" stuff is so that such users can use "git checkout" to explore any revision and never have to worry about doing anything "wrong", (never leave any commits dangling), nor ever have to see any "scary" message, (ie. "use checkout -f if you know what you are doing"). -Carl PS. Thanks for giving detached head some attention---I'm chronically inept at getting into actual git development like I'd really like to. --pgp-sign-Multipart_Mon_Jan__8_16:42:54_2007-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFouUU6JDdNq8qSWgRAtl+AKCSaw191v+ItcnfgxzS6L77Ik4IWQCgp489 ng9thNRcNwyNTmBTR9IyvHQ= =940a -----END PGP SIGNATURE----- --pgp-sign-Multipart_Mon_Jan__8_16:42:54_2007-1--