Re: git init doesn't create master branch

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

 



"Ákos, Tajti" <akos.tajti@xxxxxxxxxxx> writes:

> Dear List,
>
> the manual of git init says: "An initial HEAD file that references the
> HEAD of the master branch is also created."
>
> However, after creating the repository using git init there's no
> master branch.

Right, but HEAD still points to it ;-). We sometimes call this an
"unborn branch".

> How can make sure that master is created?

It will be created when you do the first commit. If you insist in having
master created before you actually start working, you can run:

  git commit -m "Initial empty commit" --allow-empty

Right after "git init".

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]