From: Junio C Hamano Date: Fri, 03 Jun 2022 18:56:12 GMT Subject: Re: AW: git log on bare repository fails if the default branch is not called master Message-ID: In-Reply-To: <9df6c37e-4c43-7697-0562-c49d4fa5b38f@mnementh.co.uk> Ian Molton writes: > Why does a bare repo even have a HEAD file? (genuinely curious). It > seems like it'd be best to create it when it's first pushed to? then > it'd match whatever is used in the pushing repo... There indeed are things that have no reason to exist in a bare repository, but HEAD is not among them. It should have HEAD to indicate what the owner of the repository considers the primary branch to follow the project hosted there. Anybody cloning from that bare repository will learn the name of what HEAD points at and that branch gets checked out when "clone" finishes its job.