From: Junio C Hamano Subject: Re: [BUG?] Detaching head at checked out point does not work. Date: Sat, 12 May 2007 11:26:53 -0700 Message-ID: <7v7ird2902.fsf@assigned-by-dhcp.cox.net> References: <20070512172105.GB32764@efreet.light.src> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org To: Jan Hudec X-From: git-owner@vger.kernel.org Sat May 12 20:27:14 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 1HmwJD-0004iO-9Z for gcvg-git@gmane.org; Sat, 12 May 2007 20:27:11 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755241AbXELS0z (ORCPT ); Sat, 12 May 2007 14:26:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755307AbXELS0z (ORCPT ); Sat, 12 May 2007 14:26:55 -0400 Received: from fed1rmmtao105.cox.net ([68.230.241.41]:40835 "EHLO fed1rmmtao105.cox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755241AbXELS0z (ORCPT ); Sat, 12 May 2007 14:26:55 -0400 Received: from fed1rmimpo01.cox.net ([70.169.32.71]) by fed1rmmtao105.cox.net (InterMail vM.7.05.02.00 201-2174-114-20060621) with ESMTP id <20070512182654.VNPM22040.fed1rmmtao105.cox.net@fed1rmimpo01.cox.net>; Sat, 12 May 2007 14:26:54 -0400 Received: from assigned-by-dhcp.cox.net ([68.5.247.80]) by fed1rmimpo01.cox.net with bizsmtp id yJSt1W0071kojtg0000000; Sat, 12 May 2007 14:26:53 -0400 In-Reply-To: <20070512172105.GB32764@efreet.light.src> (Jan Hudec's message of "Sat, 12 May 2007 19:21:05 +0200") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Jan Hudec writes: > Hello, > > I can correctly detach head by saying: > > git checkout master^0 > > (or git checkout master^{} or git checkout refs/heads/master), but NONE of > these work, if I currently have master checked out. Shouldn't it detach > anyway? Yes, and it does as far as I know. Do you have 3e0318a3? commit 3e0318a3613ae8e89dcb1fc39d909145e64287b9 Author: Junio C Hamano Date: Thu Mar 29 01:02:50 2007 -0700 checkout: allow detaching to HEAD even when switching to the tip of a branch You cannot currently checkout the tip of an existing branch without moving to the branch. This allows you to detach your HEAD and place it at such a commit, with: $ git checkout master^0 Signed-off-by: Junio C Hamano