git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Dan Farina <drfarina@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: backup or mirror a repository
Date: Fri, 28 Sep 2007 02:56:49 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0709280253150.28395@racer.site> (raw)
In-Reply-To: <1190940704.2263.32.camel@Tenacity>

Hi,

On Thu, 27 Sep 2007, Dan Farina wrote:

> On Thu, 2007-09-27 at 22:56 +0100, Johannes Schindelin wrote:
> > I guess you're looking for "git remote add --mirror origin <url>".  
> > AFAIK this is not in any released version yet, though.
> 
> I just tried a bleeding edge git with --mirror.
> 
> It's close, except (unless there is some other provision to take care of 
> this) remote branch deletes. (Which, after more gmane trolling, seemed 
> to be "git remote rm", which doesn't seem present just yet).

git remote rm is about removing the remote nick, not a remote branch.

> Of course, it is completely possible I'm using it incorrectly. In brief, 
> I did "git init" "git remote add --mirror backup <url>" "git pull"

"git pull" without further parameters accesses the remote "origin", not 
"backup", and it merges _one_ branch into the current branch.

What you should have done is "git fetch backup".

Or use "origin" instead of "backup" right from the start, and then use 
"git fetch".

But no pull.

> (perhaps I should have used "git remote update"?) And the behavior of 
> this is more or less what I wanted, as far as sending branches. 
> Convenient removal of branches and propagating that removal still stumps 
> me. Is there a preferred way to do this yet?

You want to remove branches from the local repo which are no longer there 
on the remote side?

Then "git remote prune" is for you.  For details, please see the man page.

Ciao,
Dscho

  reply	other threads:[~2007-09-28  1:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-27 19:35 backup or mirror a repository Dan Farina
2007-09-27 21:56 ` Johannes Schindelin
2007-09-28  0:51   ` Dan Farina
2007-09-28  1:56     ` Johannes Schindelin [this message]
2007-09-28  2:37       ` Dan Farina
2007-09-28  6:27         ` Junio C Hamano
2007-09-28  7:20           ` Dan Farina
2007-10-18  5:32           ` Dmitry Potapov
2007-10-30  0:33             ` Johannes Schindelin

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.0709280253150.28395@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=drfarina@gmail.com \
    --cc=git@vger.kernel.org \
    /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).