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

[BUG?] git remote rm repo nukes local refs for mirror repo

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Oct 14, 2008, 09:05 UTC
Message-ID
<48F460DB.9030209@drmicha.warpmail.net>

I just noticed the hard way that "git remote rm repo" nukes all local (mirrored) refs if repo had been setup with "git remote add --mirror repo url". Some may argue that this behaviour fits the description "deletes all remote tracking branches" but I would claim it does not: mirrored branches are not remote tracking branches in the proper sense.

So:
- Is this behaviour intended?
- If yes, how else would I remove a remote mirror configuration without
destroying a local repo? git config, I know, but that can't be the way.
Michael

Technical: remote_find_tracking() in remote.c returns "branch" as the remote tracking branch of "branch" (itself) in a mirror setup. Is this the right thing to do?

Next: Johannes Schindelin
Message 1 of 4 in “[BUG?] git remote rm repo nukes local refs for mirror repo”
  1. Michael J GruberOct 14, 2008
  2. Johannes SchindelinOct 14, 2008
  3. Samuel TardieuOct 14, 2008
  4. Michael J GruberOct 14, 2008

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.