Skip to content

Instantly share code, notes, and snippets.

@MarkBennett
Created April 17, 2013 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkBennett/5407031 to your computer and use it in GitHub Desktop.
Save MarkBennett/5407031 to your computer and use it in GitHub Desktop.
Inspired by @nathany I took a stab at my own script to remove old git branches.
branches=$(git branch --merged | grep -v "master$")
for branch in $branches
do
echo "Removing old branch '$branch'"
git branch -d $branch
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment