Subject: Re: AW: git log on bare repository fails if the default branch is not called master

From: Junio C Hamano <[email-masked]>
Date: Fri, 03 Jun 2022 11:56:12 -0700

Ian Molton <[email-masked]> 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.