Re: creating a new branch without an ancestor
- From
Larry D'Anna <larry@elder-gods.org>
- Date
- Feb 5, 2010, 03:24 UTC
- Message-ID
- <20100205032429.GA23285@cthulhu>
- In-Reply-To
- <d2e97e801002041919r2043d05cjfb114a466605d9a1@mail.gmail.com>
* Michael Wookey (michaelwookey@gmail.com) [100204 22:20]:
Show 10 quoted lines
> Maybe I'm missing something from reading the docs, but I couldn't see > how to create a new branch in an existing repo that has no ancestor. I > would like to do something like what git.git does with some of the > other ancillary branches like "man", "html", and "todo". > > I was hoping to do something like "git branch --no-ancestor > new-branch-name" but didn't see anything in the documentation that > describes the necessary branch options. > > Or, am I looking in the wrong place?
git symbolic-ref HEAD refs/heads/whatever
That'll leave your index and working tree alone of course, so if you did a commit right after that it would match the content of your current branch but not the history.
--larry