Skip to content

Instantly share code, notes, and snippets.

@ssoper
Last active October 20, 2020 13:21
Show Gist options
  • Save ssoper/060d89b766425d7161267c8a30c39bc7 to your computer and use it in GitHub Desktop.
Save ssoper/060d89b766425d7161267c8a30c39bc7 to your computer and use it in GitHub Desktop.
Review and remove merged git branches, works on OSX
#!/bin/sh
git branch --merged | sed '$d' >/tmp/merged-branches && \
vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment