Re: how to start with non-master branch?
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Jul 19, 2009, 18:26 UTC
- Message-ID
- <4A636565.2000703@drmicha.warpmail.net>
- In-Reply-To
- <f46c52560907190553x4e21ffbdn6d55c43f2d6b08ad@mail.gmail.com>
Rustom Mody venit, vidit, dixit 19.07.2009 14:53:
Show 11 quoted lines
> I want my first commit to be on a non-master branch. > So after the git init I do > $ git checkout -b newbranch > > I get > fatal: You are on a branch yet to be born > > Of course I can get by with making the first commit on master and then > switching. > > But wondering if I am missing something basic?
You can do
git symbolic-ref HEAD refs/heads/newbranch
and your first commit will be to that branch. (checkout as above tries to branch off the non-existing branch master.)
Cheers, Michael