git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Problems setting up bare repository (git 1.5.3.3)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 2, 2007, 17:40 UTC
Message-ID
<Pine.LNX.4.64.0710021834470.28395@racer.site>
In-Reply-To
<m34ph9tye1.fsf@barry_fishman.acm.org>
Hi,

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

On Tue, 2 Oct 2007, Barry Fishman wrote:
Show 7 quoted lines
> 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.

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 there.)

Show 5 quoted lines
> 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".

That means that there was no master branch. Before the first commit, a branch does not exist. We are stricter in that regard than other SCMs.

> If there isn't an initial master branch, then shouldn't "git branch" be
> able to create one.

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 branch later, when you got something, by "git branch -m <new-branch-name>".

>   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.

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

Ciao, Dscho

Previous: Barry FishmanNext: Barry Fishman
Message 10 of 18 in “Problems setting up bare repository (git 1.5.3.3)”
  1. Barry FishmanOct 1, 2007
  2. Junio C HamanoOct 1, 2007
  3. Carl WorthOct 1, 2007
  4. J. Bruce FieldsOct 1, 2007
  5. Junio C HamanoOct 1, 2007
  6. Carl WorthOct 1, 2007
  7. Shawn O. PearceOct 1, 2007
  8. Johannes SchindelinOct 2, 2007
  9. Barry FishmanOct 2, 2007
  10. Johannes SchindelinOct 2, 2007
  11. Barry FishmanOct 2, 2007
  12. Carl WorthOct 2, 2007
  13. Johannes SchindelinOct 2, 2007
  14. Junio C HamanoOct 2, 2007
  15. SeanOct 2, 2007
  16. Junio C HamanoOct 2, 2007
  17. Johannes SchindelinOct 2, 2007
  18. Johannes SchindelinOct 2, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.