Skip to content

Instantly share code, notes, and snippets.

@flyingoctopus
Forked from pgib/delete-branch.sh
Created April 17, 2012 16:18
Show Gist options
  • Save flyingoctopus/2407262 to your computer and use it in GitHub Desktop.
Save flyingoctopus/2407262 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