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