git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Torek <chris.torek@gmail.com>
To: Craig H Maynard <chmaynard@me.com>
Cc: git@vger.kernel.org
Subject: Re: Regarding Git and Branch Naming
Date: Fri, 26 Jun 2020 11:33:53 -0700	[thread overview]
Message-ID: <CAPx1GvcZk2o7f8-27xokwxUayWwO+t5qdsMjLrjBymc+WHznmw@mail.gmail.com> (raw)
In-Reply-To: <B4814F42-7AF8-4D80-93D4-FAF752C72F21@me.com>

On Fri, Jun 26, 2020 at 10:19 AM Craig H Maynard <chmaynard@me.com> 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

  reply	other threads:[~2020-06-26 18:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26 16:18 Regarding Git and Branch Naming Craig H Maynard
2020-06-26 18:33 ` Chris Torek [this message]
2020-06-26 20:35   ` Jeff King
2020-06-26 21:07     ` Junio C Hamano
2020-06-27  3:05       ` Jeff King
2020-06-26 21:33     ` Philip Oakley
2020-06-27  3:11       ` Jeff King
2020-06-26 21:58     ` Elijah Newren
2020-06-27  3:14       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPx1GvcZk2o7f8-27xokwxUayWwO+t5qdsMjLrjBymc+WHznmw@mail.gmail.com \
    --to=chris.torek@gmail.com \
    --cc=chmaynard@me.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).