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

[Feature Request] Allow batch removal of remotes with 'git remote remove'

From
CJChristian Fredrik Johnsen <cfj@johnsen.no>
Date
Jan 20, 2025, 23:06 UTC
Message-ID
<DB9PR05MB110863344D3776D13B436F563C1E72@DB9PR05MB11086.eurprd05.prod.outlook.com>
Hello 😃
I would like to propose a feature enhancement to the 'git remote remove' command.

--- The Problem --- Currently, 'git remote remove' only supports removing one remote at a time. However, it would be useful to allow batch removal of remotes, as in:

`git remote remove remote1 remote2 remote3`
This would simplify workflows for repositories with multiple remotes when clean-up operations are needed.

--- Proposed Solution --- Modify the 'git remote remove' command to accept multiple remote names as arguments and remove them all in a single invocation.

For example:
`git remote remove myfork myrepo origin`
--- Benefits
- Reduces repetitive commands for users with many remotes.
- Aligns with existing batch-like behavior in commands like 'git branch -d branch1 branch2'.
- Streamlines repository maintenance, especially for power users.
Thank you for considering this request. I’d be happy to provide further details or clarification if needed.

Best regards, Christian Fredrik Johnsen

===================================================== ---> Generated this message with ChatGPT, but it gets to the point.

I am assuming that this is such a niche case that it hasn't been reported yet, though please correct me if I am wrong. There are no `github issues` I can search through to find older related issues, so I'll give it a go.

Attached a picture showing the situation where I encountered the issue.
Next: Emily Shaffer
Message 1 of 8 in ā€œ[Feature Request] Allow batch removal of remotes with 'git remote remove'ā€
  1. Christian Fredrik JohnsenJan 20, 2025
  2. Emily ShafferJan 21, 2025
  3. D. Ben KnobleJan 21, 2025
  4. Junio C HamanoJan 21, 2025
  5. brian m. carlsonJan 22, 2025
  6. Jeff KingJan 22, 2025
  7. Junio C HamanoJan 22, 2025
  8. Patrick SteinhardtJan 22, 2025

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.