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

Unable to clone empty repositories remotely

From
HKHannu Koivisto <azure@iki.fi>
Date
Nov 25, 2008, 21:05 UTC
Message-ID
<837i6rplcd.fsf@kalahari.s2.org>
Greetings,

mkdir test cd test git init --bare --shared=group cd .. git clone test test2

works, though clone says it cannot checkout, which is expected. This is nevertheless very useful when you create a shared repository for a new project; you can then create a personal clone and start adding stuff to it. If, however, you normally work on another machine and want to have your personal clone there (i.e. git clone ssh://therepomachine/somewhere/test), cloning doesn't work at all (tested with git 1.6.0.3.525.ge32c2 in Cygwin):

Initialized empty Git repository in /cygdrive/c/temp/test/.git/ fatal: no matching remote head

This behaviour isn't documented by either git-init(1) or git-clone(1). I think it would be very convenient if this worked for the reasons mentioned above. I'm sure you could create your personal repository with git init and then git remote add the shared repository to it but that's much more difficult.

-- 
Hannu
Next: Christian MICHON
Message 1 of 3 in “Unable to clone empty repositories remotely”
  1. Hannu KoivistoNov 25, 2008
  2. Christian MICHONNov 25, 2008
  3. Hannu KoivistoNov 26, 2008

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.