git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How-to setup an empty remote repository?
@ 2007-08-25 21:00 Wink Saville
  2007-08-25 22:06 ` Petr Baudis
  2007-09-04 19:47 ` Jan Hudec
  0 siblings, 2 replies; 4+ messages in thread
From: Wink Saville @ 2007-08-25 21:00 UTC (permalink / raw)
  To: git

Hello,

I thought I'd try to setup a shared "empty" remote repository and then
clone it and then push the initial commit from another maching.
This failed as shown below:

 $ cd ~/git-repos
 $ mkdir test.git
 $ cd test.git
 $ git --bare init --shared
 Initialized empty shared Git repository in /home/wink/git-repos/test.git/
 $ git-daemon --reuseaddr --verbose --base-path=/home/wink/git-repos \
    --export-all --enable=receive-pack

On my other machine:

$ git clone git://192.168.0.8/test.git
Initialized empty Git repository in /home/wink/prgs/test/.git/
fatal: no matching remote head
fetch-pack from 'git://192.168.0.8/test.git' failed.
$

And the remote machine responded:

[27299] Connection from 192.168.0.133:56710
[27299] Extended attributes (18 bytes) exist <host=192.168.0.8>
[27299] Request upload-pack for '/test.git'
[27299] Disconnected

In the instructions I followed for setting up a remote repository,
http://www.kernel.org/pub/software/scm/git/docs/cvs-migration.html,
it uses an existing repository. So is it true you can't clone an
empty remote repository, or did I do something wrong?

I'm using :
$ git --version
git version 1.5.3.rc6.23.g0058

Note, my reason for using the shared remote repository is to make it
simple and easy to backup my repository on a second machine and
it seemed reasonable to try a an empty repository.

Cheers,

Wink Saville

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How-to setup an empty remote repository?
  2007-08-25 21:00 How-to setup an empty remote repository? Wink Saville
@ 2007-08-25 22:06 ` Petr Baudis
  2007-08-25 22:45   ` Wink Saville
  2007-09-04 19:47 ` Jan Hudec
  1 sibling, 1 reply; 4+ messages in thread
From: Petr Baudis @ 2007-08-25 22:06 UTC (permalink / raw)
  To: Wink Saville; +Cc: git

On Sat, Aug 25, 2007 at 11:00:33PM CEST, Wink Saville wrote:
> In the instructions I followed for setting up a remote repository,
> http://www.kernel.org/pub/software/scm/git/docs/cvs-migration.html,
> it uses an existing repository. So is it true you can't clone an
> empty remote repository, or did I do something wrong?

It is true that you can't clone it. "Cloning remote repository" means
just "get all the remote branches and set them up locally". In empty
repository there are no branches yet, so there's nothing to clone.

I guess this should be covered in the FAQ (if it isn't already), it is
one of the top questions repo.or.cz users have and I think I see it
frequently on IRC as well.

-- 
				Petr "Pasky" Baudis
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
		-- Samuel Beckett

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How-to setup an empty remote repository?
  2007-08-25 22:06 ` Petr Baudis
@ 2007-08-25 22:45   ` Wink Saville
  0 siblings, 0 replies; 4+ messages in thread
From: Wink Saville @ 2007-08-25 22:45 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

On 8/25/07, Petr Baudis <pasky@suse.cz> wrote:
> On Sat, Aug 25, 2007 at 11:00:33PM CEST, Wink Saville wrote:
> > In the instructions I followed for setting up a remote repository,
> > http://www.kernel.org/pub/software/scm/git/docs/cvs-migration.html,
> > it uses an existing repository. So is it true you can't clone an
> > empty remote repository, or did I do something wrong?
>
> It is true that you can't clone it. "Cloning remote repository" means
> just "get all the remote branches and set them up locally". In empty
> repository there are no branches yet, so there's nothing to clone.
>
> I guess this should be covered in the FAQ (if it isn't already), it is
> one of the top questions repo.or.cz users have and I think I see it
> frequently on IRC as well.
>
> --

I didn't see it here, http://git.or.cz/gitwiki/GitFaq.

I would have expected it to setup an empty repository and then
populate it with 0 remote branches. Obviously, its a corner case
and maybe doesn't need addressing but if it is asked a lot then
maybe it should work that way.

Thanks,

Wink

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How-to setup an empty remote repository?
  2007-08-25 21:00 How-to setup an empty remote repository? Wink Saville
  2007-08-25 22:06 ` Petr Baudis
@ 2007-09-04 19:47 ` Jan Hudec
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Hudec @ 2007-09-04 19:47 UTC (permalink / raw)
  To: Wink Saville; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]

On Sat, Aug 25, 2007 at 14:00:33 -0700, Wink Saville wrote:
> Hello,
> 
> I thought I'd try to setup a shared "empty" remote repository and then
> clone it and then push the initial commit from another maching.
> This failed as shown below:
> 
>  $ cd ~/git-repos
>  $ mkdir test.git
>  $ cd test.git
>  $ git --bare init --shared
>  Initialized empty shared Git repository in /home/wink/git-repos/test.git/
>  $ git-daemon --reuseaddr --verbose --base-path=/home/wink/git-repos \
>     --export-all --enable=receive-pack
> 
> On my other machine:
> 
> $ git clone git://192.168.0.8/test.git
> Initialized empty Git repository in /home/wink/prgs/test/.git/
> fatal: no matching remote head
> fetch-pack from 'git://192.168.0.8/test.git' failed.
> $

Did it configure the repository though? Like setting the url and tracking
branches for origin? If it did, it actually did all you needed, so you can
count it as success (and the message should talk about having nothing to do
rather than failing).

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-04 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-25 21:00 How-to setup an empty remote repository? Wink Saville
2007-08-25 22:06 ` Petr Baudis
2007-08-25 22:45   ` Wink Saville
2007-09-04 19:47 ` Jan Hudec

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).