After a few weeks of merged pull requests, your local git branches pile up with no remote behind them anymore. Cleaning them up one by one gets old fast, so here’s how I do it with a single command.
👉 Continue reading on my blog: 🍂 Remove gone git branches
Top comments (5)
Thanks, this is great! Minor tweak to use the
--filteroption to make sure we're not possibly matching on commit string contents (as unlikely as that may be):Some WIP branches be like: you'll gonna miss me when i'm gone 😄.
😀
Great :-)
Great article ! But it seems that it is not working with the
git config remote.origin.prune trueenabled because it looks like that this config also remove the reference to the remote branch :/