Re: Bug: "git checkout -b" should be allowed in empty repo
- From
Jeff King <peff@peff.net>
- Date
- Feb 6, 2012, 08:57 UTC
- Message-ID
- <20120206085707.GA24149@sigill.intra.peff.net>
- In-Reply-To
- <4F2F94AC.6010800@alum.mit.edu>
On Mon, Feb 06, 2012 at 09:51:56AM +0100, Michael Haggerty wrote:
Show 9 quoted lines
> On 02/06/2012 06:06 AM, Jeff King wrote: > >I don't recall seeing anybody complain seriously about it in the past > >six years of git's existence. > > In the real-world situation when I noticed this bug, I wasn't trying to > use a nonstandard name for "master". What I was doing is importing a > snapshot of some code from another non-git project onto a "vendor > branch", which I knew I would later want to merge into my own work > (which I planned to do on master).
Thanks, that sounds like a very reasonable use case. I stand corrected.
(For some reason I thought you ran across it accidentally while mucking with "--edit-description", since were talking about that an unborn branches in a nearby thread).
-Peff
PS I probably would have done it as:
git init vendor
cd vendor
import import import
cd .. git init project
cd project
git fetch ../vendor master:vendorbut I don't think there's anything wrong with your approach (in fact, it's slightly more efficient).