All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Jan Hudec <bulb@ucw.cz>
Cc: git@vger.kernel.org
Subject: Re: [BUG?] Detaching head at checked out point does not work.
Date: Sat, 12 May 2007 11:26:53 -0700	[thread overview]
Message-ID: <7v7ird2902.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20070512172105.GB32764@efreet.light.src> (Jan Hudec's message of "Sat, 12 May 2007 19:21:05 +0200")

Jan Hudec <bulb@ucw.cz> 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 <junkio@cox.net>
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 <junkio@cox.net>

  reply	other threads:[~2007-05-12 18:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-12 17:21 [BUG?] Detaching head at checked out point does not work Jan Hudec
2007-05-12 18:26 ` Junio C Hamano [this message]
2007-05-12 19:18   ` Jan Hudec
2007-05-12 19:35     ` Junio C Hamano
2007-05-12 20:18       ` Jan Hudec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v7ird2902.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=bulb@ucw.cz \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.