Skip to content

Instantly share code, notes, and snippets.

@ryanaghdam
Created May 16, 2013 14:23
Show Gist options
  • Save ryanaghdam/5592081 to your computer and use it in GitHub Desktop.
Save ryanaghdam/5592081 to your computer and use it in GitHub Desktop.
Delete all merged branches, except for master and the current branch.
#!bin/bash
git branch --merged | grep -v \* | grep -v master | xargs -n1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment