{"thread":{"id":"37364","subject":"Feature Request: `git remote prune --all`","startedAt":"2014-08-17T00:52:44Z","lastAt":"2014-08-18T05:56:28Z","messageCount":3,"participants":["Travis Carden","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"247797","messageId":"CAByVDef1_7x8Q1SL5wMtrKJQE51gvEOiKJ4xkpexXN5omBDn-Q@mail.gmail.com","threadId":"37364","inReplyTo":null,"subject":"Feature Request: `git remote prune --all`","fromName":"Travis Carden","fromEmail":"travis.carden@gmail.com","sentAt":"2014-08-17T00:52:44Z","receivedAt":"2014-08-17T00:52:44Z","isPatch":false,"sender":{"key":"travis.carden@gmail.com","avatar":"https://gravatar.com/avatar/c55ed0dc1d2e7df0158d61a56358e5299a38cdcc3728d513ce335382de9b94fe?d=mp&s=160"},"body":"I would like to propose the addition of a `git remote prune --all`\ncommand option or similar mechanism for pruning all remotes in a\nrepository. For lack of such a feature, I've been using the following\nbash alias:\n\nalias git-remote-prune-all='for REMOTE in `git remote`; do echo\n\"Pruning $REMOTE\"; git remote prune $REMOTE; done;'\n"},{"id":"247801","messageId":"20140817071805.GC23808@peff.net","threadId":"37364","inReplyTo":"CAByVDef1_7x8Q1SL5wMtrKJQE51gvEOiKJ4xkpexXN5omBDn-Q@mail.gmail.com","subject":"Re: Feature Request: `git remote prune --all`","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-08-17T07:18:05Z","receivedAt":"2014-08-17T07:18:05Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Aug 16, 2014 at 07:52:44PM -0500, Travis Carden wrote:\n\n> I would like to propose the addition of a `git remote prune --all`\n> command option or similar mechanism for pruning all remotes in a\n> repository. For lack of such a feature, I've been using the following\n> bash alias:\n> \n> alias git-remote-prune-all='for REMOTE in `git remote`; do echo\n> \"Pruning $REMOTE\"; git remote prune $REMOTE; done;'\n\nI think in general we've been moving \"git remote\" away from actually\ninteracting with the other side, and pushing those features into \"git\nfetch\". These days you can use \"git fetch --prune --all\" to do what you\nwant.\n\nNote that this isn't _exactly_ the same thing. Fetch's prune will do a\nnormal fetch and _also_ prune. There is no way to say \"just prune, but\ndo not update existing refs\". If that detail is important, I think I'd\nrather see the feature go the other way from your request: teach\ngit-fetch a \"--prune-only\" mode.\n\n-Peff\n"},{"id":"247831","messageId":"CAByVDedhkUgXkey9dkPYxVQqvzRW4D9OOXt4uFa74+7PvX0mjA@mail.gmail.com","threadId":"37364","inReplyTo":"20140817071805.GC23808@peff.net","subject":"Re: Feature Request: `git remote prune --all`","fromName":"Travis Carden","fromEmail":"travis.carden@gmail.com","sentAt":"2014-08-18T05:56:28Z","receivedAt":"2014-08-18T05:56:28Z","isPatch":false,"sender":{"key":"travis.carden@gmail.com","avatar":"https://gravatar.com/avatar/c55ed0dc1d2e7df0158d61a56358e5299a38cdcc3728d513ce335382de9b94fe?d=mp&s=160"},"body":"Thanks, guys! `git fetch --all --prune` satisfies my request. I\nappreciate the education!\n\nOn Sun, Aug 17, 2014 at 2:18 AM, Jeff King <peff@peff.net> wrote:\n> On Sat, Aug 16, 2014 at 07:52:44PM -0500, Travis Carden wrote:\n>\n>> I would like to propose the addition of a `git remote prune --all`\n>> command option or similar mechanism for pruning all remotes in a\n>> repository. For lack of such a feature, I've been using the following\n>> bash alias:\n>>\n>> alias git-remote-prune-all='for REMOTE in `git remote`; do echo\n>> \"Pruning $REMOTE\"; git remote prune $REMOTE; done;'\n>\n> I think in general we've been moving \"git remote\" away from actually\n> interacting with the other side, and pushing those features into \"git\n> fetch\". These days you can use \"git fetch --prune --all\" to do what you\n> want.\n>\n> Note that this isn't _exactly_ the same thing. Fetch's prune will do a\n> normal fetch and _also_ prune. There is no way to say \"just prune, but\n> do not update existing refs\". If that detail is important, I think I'd\n> rather see the feature go the other way from your request: teach\n> git-fetch a \"--prune-only\" mode.\n>\n> -Peff\n"}]}