From: Michael J Gruber <git@drmicha.warpmail.net>
To: Rustom Mody <rustompmody@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: how to start with non-master branch?
Date: Sun, 19 Jul 2009 20:26:45 +0200 [thread overview]
Message-ID: <4A636565.2000703@drmicha.warpmail.net> (raw)
In-Reply-To: <f46c52560907190553x4e21ffbdn6d55c43f2d6b08ad@mail.gmail.com>
Rustom Mody venit, vidit, dixit 19.07.2009 14:53:
> 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
prev parent reply other threads:[~2009-07-19 18:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-19 12:53 how to start with non-master branch? Rustom Mody
2009-07-19 16:13 ` Dirk Süsserott
2009-07-19 16:19 ` Sean Estabrooks
2009-07-19 17:44 ` Charles Bailey
2009-07-19 18:26 ` Michael J Gruber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A636565.2000703@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=rustompmody@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).