Bug: "git checkout -b" should be allowed in empty repo
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Jan 29, 2012, 06:09 UTC
- Message-ID
- <4F24E287.3040302@alum.mit.edu>
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 bornI 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/