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

Re: Short rant about git usability - make 'git clone' work on an empty remote repository

From
Sverre Rabbelier <srabbelier@gmail.com>
Date
Jan 22, 2009, 13:00 UTC
Message-ID
<bd6139dc0901220500q7bb91031o81c3aab41c68d518@mail.gmail.com>
In-Reply-To
<20090122100230.GA9653@amd.home.annexia.org>
Heya,
On Thu, Jan 22, 2009 at 11:02, Richard W.M. Jones <rjones@redhat.com> wrote:
Show 15 quoted lines
>  $ git clone git+ssh://rwmj@git.ocamlcore.org/gitroot/ocaml-autoconf/ocaml-autoconf.git
>  Initialized empty Git repository in /home/rjones/d/ocaml-autoconf/.git/
>  fatal: no matching remote head
>  $ mkdir ocaml-autoconf
>  $ cd ocaml-autoconf
>  $ git init
>  Initialized empty Git repository in /home/rjones/d/ocaml-autoconf/.git/
>  $ git remote add origin git+ssh://rwmj@git.ocamlcore.org/gitroot/ocaml-autoconf/ocaml-autoconf.git
>  $ echo test > README
>  $ git add README
>  $ git commit
>  Created initial commit 2c9a63a: Create repository.
>   1 files changed, 1 insertions(+), 0 deletions(-)
>   create mode 100644 README
>  $ git push origin master

Is, as far as I can see, the minimal you could have done to get your remote set up. You are right in that cloning an empty repository would be nice to have as it would save having to remember to do about 8 different commands. Then again, after digging through the source for half an hour I'm still not sure I even understand what's going on, let alone know how to fix it ;). You should ask on #git for cloning empty dir support, maybe it'll annoy Dscho enough to fix it.

-- 
Cheers,

Sverre Rabbelier
Previous: Mikael MagnussonNext: Johannes Schindelin
Message 3 of 4 in “Short rant about git usability - make 'git clone' work on an empty remote repository”
  1. Richard W.M. JonesJan 22, 2009
  2. Mikael MagnussonJan 22, 2009
  3. Sverre RabbelierJan 22, 2009
  4. Johannes SchindelinJan 22, 2009

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.