Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: git init doesn't create master branch

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:57:29

"Ákos, Tajti" [off-list ref] 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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help