git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Sean Hunt <seandhunt_7@icloud.com>, git@vger.kernel.org
Subject: Re: Where is git checkout --orphan implemented at.
Date: Mon, 11 Jun 2018 17:09:38 -0400	[thread overview]
Message-ID: <20180611210938.GA26235@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqa7s1cjkj.fsf@gitster-ct.c.googlers.com>

On Mon, Jun 11, 2018 at 10:35:40AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > If you don't even have symbolic-ref handy, you can do:
> >
> >   echo "ref: refs/heads/new-branch" >.git/HEAD
> >
> > That's not generally recommended, since future versions of Git may
> > change the ref storage format, but it would work with any current
> > version of Git.
> 
> Makes one wonder if it really "works" if .git/HEAD was created by
> older version of Git or in a repository where prefer-symlink-refs is
> enabled, though ;-)

Heh, true. I guess "rm -f .git/HEAD" before would "fix" it.

-Peff

      reply	other threads:[~2018-06-11 21:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-05 16:02 Where is git checkout --orphan implemented at Sean Hunt
2018-06-05 17:54 ` Jeff King
2018-06-11 17:35   ` Junio C Hamano
2018-06-11 21:09     ` Jeff King [this message]

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=20180611210938.GA26235@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=seandhunt_7@icloud.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).