Re: backup or mirror a repository
- From
Dan Farina <drfarina@gmail.com>
- Date
- Sep 28, 2007, 02:37 UTC
- Message-ID
- <1190947063.2263.46.camel@Tenacity>
- In-Reply-To
- <Pine.LNX.4.64.0709280253150.28395@racer.site>
On Fri, 2007-09-28 at 02:56 +0100, Johannes Schindelin wrote:
> Hi, > > On Thu, 27 Sep 2007, Dan Farina wrote:
> git remote rm is about removing the remote nick, not a remote branch.
Ah, I thought for some reason there'd be a "remove" (since the other operations have long names) and, much like "ls-remote" there'd be some "rm-remote." An insane presupposition of mine from having too little information.
Show 6 quoted lines
> 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.
I did use "pull backup" (my error for being sloppy and omitting it from my mail) and it does work provided I do the dirty thing of doing a subsequent reset --hard (I thought perhaps things were not yet fully-there). Fetch does it perfectly, as you say, thanks!
Show 5 quoted lines
> 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. >
I did look at prune and update, but my problem is the opposite: I want something that will remove branches from the remote repo when they no longer exist locally. As-is over time I will proliferate little local branches unless I occasionally sit down and delete branches by operating directly on the bare backup repository. (and then use prune on the remote nodes)
Thanks, fdr