From: Junio C Hamano Date: Mon, 06 Feb 2012 18:31:20 GMT Subject: Re: Bug: "git checkout -b" should be allowed in empty repo Message-ID: <7vliof7r0n.fsf@alter.siamese.dyndns.org> In-Reply-To: <4F2F9661.2020606@alum.mit.edu> Michael Haggerty writes: >> So we are breaking the equivalence between these three only when HEAD >> points at an unborn branch. > > You are thinking too much like a developer and not like a user. For a user, > > git checkout -b foo > > is a short-hand for > > "create and check out a branch at my current state" > > and the interpretation of what that means when I am on an unborn branch > seems unambiguous. Ok, that is a very good explanation. Care to come up with a patch to Documentation/git-checkout.txt? The description there strongly implies that is an existing commit. Not much is said about what the lack of mean when it describes "checkout -b", and a standalone description of says "The name of a comit at which to start... Defaults to HEAD". These need to be loosened and described in terms of the closer-to-the-user "at my current state".