Re: Bug: "git checkout -b" should be allowed in empty repo
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 6, 2012, 05:15 UTC
- Message-ID
- <7vty34a6fd.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20120206043012.GD29365@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 13 quoted lines
> I thought the concern wasn't confusion at the error message, but rather > "how do I start a new repository with a branch named something besides > 'master'?" > > You would expect: > > git init > git checkout -b foo > > to work, but it doesn't. And there's no easy way to do what you want > (you have to resort to plumbing to put the value in HEAD). So the issue > is not a bad error message or a confusing situation, but that the user > wants to accomplish X, and we don't provide a reasonable way to do it.
I think the right interface for "I want to use 'foo' instead of 'master' like everybody else" would be:
$ git init --some-option foo
I wouldn't have any issue with that.