On Mon, Jan 20, 2025 at 3:07 PM Christian Fredrik Johnsen <cfj@xxxxxxxxxx> wrote: > > 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. Hi Christian, is there a reason why opening up the config (`vim .git/config` or `git config edit --local`) and batch-deleting remotes from there is undesirable? If this is a solution you believe only power users need, then I'd posit a power user can both list all remotes *and* remove the offending ones in a single editor pass, rather than having to run multiple `git remote` commands, anyway. > > --- 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.