Skip to content

Instantly share code, notes, and snippets.

@pgib
Created April 17, 2012 16:13
Show Gist options
  • Save pgib/2407232 to your computer and use it in GitHub Desktop.
Save pgib/2407232 to your computer and use it in GitHub Desktop.
Delete multiple local/remote git branches. (Put this in your shell's profile and smoke it!)
delete-branch()
{
for i in `echo $*`; do
echo "Deleting local and remote branch $i..."
git push origin :$i
git branch -D $i
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment