Can you explain head in terms of git and also tell the number of heads that can be present in a repository?

Can you explain head in terms of git and also tell the number of heads that can be present in a repository?

Hi Miro Vasil,

A head is nothing but a reference to the last commit object of a branch. For every repository, there will always be a default head referred to as “master” or now “main” (as per GitHub) but there is no restriction to the count of heads available. In other words, it can have any number of heads.