Phil Haack 4/17/2025

Cleaning up gone branches

Read Original

The article details a developer's journey to fix a Git alias for cleaning up merged branches after encountering issues with GitHub's Squash and Merge. It explains why `git branch --merged` fails after squash merges and provides a new alias that uses `git for-each-ref` to detect and delete local branches whose remote counterparts are marked as 'gone'.

Cleaning up gone branches

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week