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

Problems setting up bare repository (git 1.5.3.3)

From
Barry Fishman <barry_fishman@acm.org>
Date
Oct 1, 2007, 21:46 UTC
Message-ID
<m3fy0u7bk3.fsf@barry_fishman.acm.org>
Using the 1.5.3.3 release:

$ cd /pub/git $ mkdir foo.git $ cd foo.git $ git --bare init Initialized empty Git repository in /pub/git/foo.git/ $ git --bare branch

Note that there is no master branch.

$ cd /some/git/workdir $ git push /pub/git/foo.git master:master error: dst refspec master does not match any existing ref on the remote and does not start with refs/. fatal: The remote end hung up unexpectedly error: failed to push to '/pub/git/foo.git'

$ git push --force /pub/git/foo.git master:master error: dst refspec master does not match any existing ref on the remote and does not start with refs/. fatal: The remote end hung up unexpectedly error: failed to push to '/pub/git/foo.git'

$ git push --all /pub/git/foo.git
updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   e623fb5ba6fac345eb6af552b40412acdc447b31
Generating pack...
Done counting 61 objects.
Deltifying 61 objects...
 100% (61/61) done
Writing 61 objects...
Unpacking 61 objects...
 100% (61/61) done
Total 61 (delta 31), reused 50 (delta 25)
 100% (61/61) done
refs/heads/master: 0000000000000000000000000000000000000000 -> e623fb5ba6fac345eb6af552b40412acdc447b31

But what if I have more branches and want to just push the master branch? This worked when I tried it last (probably 1.5.2.2). This time I had to "git push --all" and then delete all the unwanted branches.

-- 
Barry Fishman
Next: Junio C Hamano
Message 1 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.