Re: Problems setting up bare repository (git 1.5.3.3)

Previous thread: Re: git: avoiding merges, rebasing by Eric Blake on Tuesday, October 2, 2007 - 8:16 am. (5 messages)

Next thread: [PATCH] gitk: Do not pick up file names of "copy from" lines by Johannes Sixt on Tuesday, October 2, 2007 - 10:21 am. (1 message)
To: <git@...>
Date: Tuesday, October 2, 2007 - 9:54 am

I did recheck the tutorials, and did not find the code I was
using. So there was nothing incorrect in the documentation.

As for "master working where "master:master" didn't, this only exposes a
more complex set of rules. I was not hoping for a more complex set of
rules to learn, as GIT tried to figure out what I meant. I was hoping
for a simpler command that did what I told it to do, and I was given it
by Junio Hamano.

What distracted me was that after the "git --bare init", there seemed to
be a incompletely defined setup. This sent me down the wrong path.

Although there was a master branch to which HEAD pointed, there was no
ref/heads/master file or even a "packed-refs". This also confuses the
the "git branch" command, so that when I initial tried "git --bare
branch" it seemed unaware of any master branch. I then tried:

$ git --bare branch refs/heads/master
fatal: Not a valid object name: 'master'.

If there isn't an initial master branch, then shouldn't "git branch" be
able to create one. And if there is one, shouldn't the automatic rules
explained in git-rev-parse man page find it? The error messages from
the branch command is what got me on the wrong logical path.

The man page for git-init says:

This command creates an empty git repository - basically a .git directory
with subdirectories for objects, refs/heads, refs/tags, and template
files. An initial HEAD file that references the HEAD of the master branch
is also created.

Which is true, but although there is a HEAD that references the
master branch, there isn't really any master branch. It might
say something like:

This command creates an empty git repository - basically a .git directory
with subdirectories for objects, refs/heads, refs/tags, and template
files. An initial HEAD file references the refs/heads/master branch
which is created with the first commit.

This would at least somewhat explain "git branch" results.

The man page for git-push seems clear to me now. I should ...

To: Barry Fishman <barry_fishman@...>
Cc: <git@...>
Date: Tuesday, October 2, 2007 - 1:40 pm

Hi,

[please do not cull me from the Cc: list, especially when you are quoting
me]

Good. Just for my curiousity: where in the documentation did you look for
help? (We might want to advertise "git push <nick> <branch>" more loudly

That means that there was no master branch. Before the first commit, a

Why? I really do not see the point in creating a branch which is named
different than "master", when you have nothing to begin with.

Just use "master". As easy as that.

If you really have to paint the bike shed, you can always rename your

How about "Your first commit will create the master branch" instead of the
last sentence?

Ciao,
Dscho

-

Previous thread: Re: git: avoiding merges, rebasing by Eric Blake on Tuesday, October 2, 2007 - 8:16 am. (5 messages)

Next thread: [PATCH] gitk: Do not pick up file names of "copy from" lines by Johannes Sixt on Tuesday, October 2, 2007 - 10:21 am. (1 message)