git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Johannes SchindelinNext: Junio C Hamano
Message 5 of 9 in “backup or mirror a repository”
  1. Dan FarinaSep 27, 2007
  2. Johannes SchindelinSep 27, 2007
  3. Dan FarinaSep 28, 2007
  4. Johannes SchindelinSep 28, 2007
  5. Dan FarinaSep 28, 2007
  6. Junio C HamanoSep 28, 2007
  7. Dan FarinaSep 28, 2007
  8. Dmitry PotapovOct 18, 2007
  9. Johannes SchindelinOct 30, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.