Re: Where is git checkout --orphan implemented at.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> Jeff King <peff@xxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux