From: Barry Fishman <barry_fishman@acm.org>
To: git@vger.kernel.org
Subject: Re: Problems setting up bare repository (git 1.5.3.3)
Date: Tue, 02 Oct 2007 09:54:46 -0400 [thread overview]
Message-ID: <m34ph9tye1.fsf@barry_fishman.acm.org> (raw)
In-Reply-To: Pine.LNX.4.64.0710021045430.28395@racer.site
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Well, if the OP had used "git push <bla> master" instead of
> "... master:master", it would have worked. I am unaware of any tutorial
> that suggests the latter, only of tutorials that suggest the former.
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 have
more closely read the last example. The first example might
be changed to say:
git push origin master
Find a ref that matches master in the source repository (most
likely, it would find refs/heads/master), and update (or create) the
same ref, refs/heads/master, in the origin repository with it.
--
Barry Fishman
next prev parent reply other threads:[~2007-10-02 13:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 21:46 Problems setting up bare repository (git 1.5.3.3) Barry Fishman
2007-10-01 22:32 ` Junio C Hamano
2007-10-01 23:06 ` Carl Worth
2007-10-01 23:17 ` J. Bruce Fields
2007-10-01 23:24 ` Junio C Hamano
2007-10-01 23:47 ` Carl Worth
2007-10-01 23:35 ` Shawn O. Pearce
2007-10-02 9:46 ` Johannes Schindelin
2007-10-02 13:54 ` Barry Fishman [this message]
2007-10-02 17:40 ` Johannes Schindelin
2007-10-02 19:54 ` Barry Fishman
2007-10-02 15:39 ` Carl Worth
2007-10-02 17:45 ` Johannes Schindelin
2007-10-02 18:23 ` Junio C Hamano
2007-10-02 18:55 ` Sean
2007-10-02 19:09 ` Junio C Hamano
2007-10-02 21:02 ` Johannes Schindelin
2007-10-02 20:59 ` Johannes Schindelin
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=m34ph9tye1.fsf@barry_fishman.acm.org \
--to=barry_fishman@acm.org \
--cc=git@vger.kernel.org \
/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).