From: Matthieu Moy Date: Wed, 11 Apr 2012 11:21:50 GMT Subject: Re: Why can't git open empty branches ? Message-ID: In-Reply-To: <4F8565BC.1070701@danisch.de> Hadmut Danisch writes: > It is not really plausible to create a new branch by checking out a > non-existing one. ... but it is hardly useful to create a new branch unless you want to check it out. I think the most common way to create a branch with Git is "git checkout -b new-branch", which does the creation+checkout in a single command. "git checkout --orphan" is the natural extension of it. BTW, it is rarely good practice to create an empty branch in an existing repository. You'll have different branches that do not share any history, and they would likely be better in separate repositories (or at least, be in separate local repositories, pushed to the same remote bare repository, in which case you don't need anything special, just "git init" and "git push"). That doesn't mean you shouldn't do it, but just that you may want to think twice before doing it ;-). -- Matthieu Moy http://www-verimag.imag.fr/~moy/