Skip to content

Instantly share code, notes, and snippets.

@jmbarbone
Last active August 31, 2024 17:48
Show Gist options
  • Save jmbarbone/62a7e74aa303007cdf0efe42c06b5950 to your computer and use it in GitHub Desktop.
Save jmbarbone/62a7e74aa303007cdf0efe42c06b5950 to your computer and use it in GitHub Desktop.
clean up merged branches
# I usually alias this as `git arbor`
#
# I should also probably add https://stackoverflow.com/a/28502292 for the git-checkout one
git fetch -a -p && git branch --merged | grep -Ev \"(^\\*|master|main|dev)\" | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment