Bug: "git checkout -b" should be allowed in empty repo

From: Michael Haggerty <hidden>
Date: 2016-06-15 22:52:52

When starting a new repo, git seems to insist that the first commit be
made on a branch named "master":

    $ git --version
    git version 1.7.9
    $ git init git-test
    Initialized empty Git repository in /home/mhagger/tmp/git-test/.git/
    $ cd git-test
    $ git checkout -b foo
    fatal: You are on a branch yet to be born

I would call this a bug; the last command should be allowed.  The
plumbing allows it:

    $ git symbolic-ref HEAD refs/heads/foo

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help