From: "Dirk Süsserott" <newsletter@dirk.my1.cc>
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 18:13:10 +0200 [thread overview]
Message-ID: <4A634616.9020302@dirk.my1.cc> (raw)
In-Reply-To: <f46c52560907190553x4e21ffbdn6d55c43f2d6b08ad@mail.gmail.com>
Am 19.07.2009 14:53 schrieb Rustom Mody:
> 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?
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
What about renaming the "initial master", i.e.:
git init
git add .
git commit -m "intial checkin"
git branch -m non-master-branch
and later adding a master just as any other branch, i.e.
git checkout -b master
Unfortunately renaming doesn't work before the first commit, I got an
error similar to yours.
I think the name "master" is just a convention and there's nothing
special about that branch. Could've been called "main" or sth. as well
when Linus invented it.
Dirk
next prev parent reply other threads:[~2009-07-19 16:13 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 [this message]
2009-07-19 16:19 ` Sean Estabrooks
2009-07-19 17:44 ` Charles Bailey
2009-07-19 18:26 ` Michael J Gruber
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=4A634616.9020302@dirk.my1.cc \
--to=newsletter@dirk.my1.cc \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.