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@xxxxxxxxxxxxxxx
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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html