From: Junio C Hamano Date: Mon, 11 Jun 2018 17:35:40 GMT Subject: Re: Where is git checkout --orphan implemented at. Message-ID: In-Reply-To: <20180605175435.GA22321@sigill.intra.peff.net> Jeff King 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 ;-)