git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Bill Lear <rael@zopyra.com>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: Cloning empty repositories, was Re: What is the idea for bare repositories?
Date: Thu, 15 Nov 2007 00:28:29 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0711150018160.4362@racer.site> (raw)
In-Reply-To: <18235.34578.886521.944550@lisa.zopyra.com>

Hi,

On Wed, 14 Nov 2007, Bill Lear wrote:

> On Wednesday, November 14, 2007 at 20:58:29 (+0000) Johannes Schindelin writes:
> >...
> >I have a better idea:
> >
> >[the initial import, on another machine:]
> >% mkdir new_repo
> >% cd new_repo
> >% git init
> >[add content]
> >% git commit -a -m "Initial stuff"
> >% git remote add origin git://host/repo
> >% git push origin master
> >
> >If you do not want to be bothered with setting up the default 
> >"remote" and "merge" config variables manually, it is reasonable to ask 
> >for support to do that in "git remote".
> 
> Um, ok, but the above means that this repo now differs from other
> repos, in that pushing now involves more than 'git push', i.e.,
> 'git push origin master'.

Nope.  That is necessary only for the initial push.

Remember: "git push" defaults to pushing to the remote "origin", and _all_ 
local branches which the remote knows about.

And the latter is the reason why the initial push needs a special 
handling: the local and the remote repository have no branches in common, 
because the remote one does not have _any_ branch yet!

So, once you pushed the initial push, you can drop the "origin master" 
from subsequent pushes!

> What's wrong with 'git init --mirror git://host/repo'?

It's highly unlikely that you have the same in mind as git when you say 
"--mirror" in this context.  Just have a look at git-push, which has 
recently acquired that option.

Besides, we really have "clone" for "init + fetch".

> >(I actually think that it is another example of cvs/svn damage, where 
> >you _need_ to clone first, or otherwise you will _never_ be able to 
> >commit to the repository.)
> 
> I think there is a tendency here to blame every shortcoming of git on 
> someone else's supposedly unsanitary past rather than facing up to 
> inherent problems in git itself.

I am not blaming here.  I just try to see where it comes from.

In git, all repositories are equal.  Provided you can connect two of them 
(or not even that; think of bundles), you can push back and forth between 
_all_ of them.

Since this is something I like about git, I had some problems finding out 
where this "I have to clone from the same repository I want to push to" 
idea comes from.

>  We have several very senior, very dedicated software developers who 
> LOVE git, and who loathe CVS, but who nevertheless find many vexing 
> issues in git.

And I am thankful that you bring up the vexing issues so that we can 
discuss (and hopefully fix) them.

> >BTW I am somewhat disgusted by your usage of git:// for pushing.
> 
> Whatever.  We went through this before on the list and push support was 
> added to git://.  We have SUCKY sysadmin support at our company and 
> permissions were getting HOSED using ssh pushes.  The git:// protocol 
> makes everything clean on the repo side and no nasty surprises with 
> permissions and no delays begging the support team to clean things up.

Hey, if it works for you, I am all the happier! (Of course, I am in a 
better position than you, here; I _am_ the sysadmin, and my ssh setup Just 
Works...)

Ciao,
Dscho

  reply	other threads:[~2007-11-15  0:29 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12 13:11 What is the idea for bare repositories? David Kastrup
2007-11-12 13:19 ` Bruno Cesar Ribas
2007-11-12 13:57   ` Johannes Schindelin
2007-11-12 16:19     ` Jan Wielemaker
2007-11-12 16:34       ` Cloning empty repositories, was " Johannes Schindelin
2007-11-12 16:41         ` Matthieu Moy
2007-11-12 17:15           ` Johannes Schindelin
2007-11-12 17:24             ` Bill Lear
2007-11-12 17:30               ` Johannes Schindelin
2007-11-12 17:47                 ` Matthieu Moy
2007-11-12 17:57                   ` Johannes Schindelin
2007-11-12 18:02                     ` Matthieu Moy
2007-11-12 18:06                       ` Johannes Schindelin
2007-11-12 18:09                         ` Matthieu Moy
2007-11-12 21:56                           ` Junio C Hamano
2007-11-12 22:06                             ` Nicolas Pitre
2007-11-12 22:17                               ` Johannes Schindelin
2007-11-13 22:56                                 ` David Kastrup
2007-11-13  0:13                             ` Andreas Ericsson
2007-11-13  9:48                             ` Matthieu Moy
2007-11-13 10:02                               ` Shawn O. Pearce
2007-11-13 10:50                                 ` Matthieu Moy
2007-11-13 11:40                                   ` Jeff King
2007-11-13 19:50                                   ` Brian Gernhardt
2007-11-13 21:48                                     ` Matthieu Moy
2007-11-13 23:56                                       ` Johannes Schindelin
2007-11-14  9:35                                         ` Matthieu Moy
2007-11-13 17:34                                 ` Nicolas Pitre
2007-11-13 10:08                               ` Jakub Narebski
2007-11-13 11:19                               ` Johannes Schindelin
2007-11-13 18:41                               ` Junio C Hamano
2007-11-13 22:01                                 ` Matthieu Moy
2007-11-14  0:25                                   ` Junio C Hamano
2007-11-14  9:49                                     ` Matthieu Moy
2007-11-14 12:09                             ` Sergei Organov
2007-11-14 13:41                               ` Jakub Narebski
2007-11-14 14:05                                 ` Matthieu Moy
2007-11-14 14:13                                 ` Sergei Organov
2007-11-14 19:32                               ` Junio C Hamano
2007-11-14 20:16                                 ` Bill Lear
2007-11-14 20:22                                   ` Bill Lear
2007-11-14 20:30                                   ` Wincent Colaiuta
2007-11-14 20:58                                   ` Johannes Schindelin
2007-11-14 23:38                                     ` Bill Lear
2007-11-15  0:28                                       ` Johannes Schindelin [this message]
2007-11-15  8:42                                       ` Andreas Ericsson
2007-11-15  1:16                                 ` David Kastrup
2007-11-15  8:51                                   ` Andreas Ericsson
2007-11-15 12:44                                     ` Johannes Schindelin
     [not found]                                     ` <?= =?ISO-8859-1?Q?Pine.=04LNX.4.64.0?= =?ISO-8859-1?Q?711151330300.167?= =?ISO-8859-1?Q?28@wbgn129.bioze?= =?ISO-8859-1?Q?ntrum.uni-wuerzb?= =?ISO-8859-1?Q?urg.de>
2007-11-15 13:15                                       ` David Kastrup
2007-11-15  6:19                                 ` Jeff King
2007-11-18  0:25                                 ` Jeff King
2007-11-18  1:06                                   ` Junio C Hamano
2007-11-18  3:25                                     ` Jeff King
2007-11-12 18:55                   ` Jan Wielemaker
2007-11-12 17:55                 ` Bill Lear
2007-11-12 17:33             ` Nicolas Pitre
2007-11-12 17:54               ` Johannes Schindelin
2007-11-12 18:16                 ` Nicolas Pitre
2007-11-12 19:17                 ` Andreas Ericsson
2007-11-12 21:59                   ` Junio C Hamano
2007-11-12 22:49                     ` Jakub Narebski
     [not found]           ` <Pine.LNX.4.64.0?= =?ISO-8859-1?Q?711121715090.436?= =?ISO-8859-1?Q?2@racer.site>
2007-11-12 17:32             ` David Kastrup
2007-11-12 16:39       ` Jakub Narebski
2007-11-12 14:20   ` David Tweed
2007-11-12 16:17   ` David Kastrup
2007-11-12 16:37     ` Jakub Narebski
2007-11-12 16:54       ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0711150018160.4362@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rael@zopyra.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).