Re: Regarding Git and Branch Naming

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

 



On Fri, Jun 26, 2020 at 10:19 AM Craig H Maynard <chmaynard@xxxxxx> wrote:
> Does the git init command really need to create a default branch? Perhaps that step could be left to the user.

The HEAD pseudo-ref must exist and must contain a valid OID or
branch name.  (If it does not exist, Git says that the directory
is not a repository.  Perhaps this test could be weakened, but
that's definitely a fairly big change.)

In a new, empty repository there are no valid OIDs, so HEAD must
contain a branch name.  The branch itself need not exist, but
whatever name is in HEAD is the branch that will be created
when the user makes the first commit.

Chris



[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