Skip to content

Instantly share code, notes, and snippets.

@gvko
Created May 6, 2019 17:17
Show Gist options
  • Save gvko/94c2d382531bedea275c6de13a5ada71 to your computer and use it in GitHub Desktop.
Save gvko/94c2d382531bedea275c6de13a5ada71 to your computer and use it in GitHub Desktop.
Pass an X number of branches as arguments to the script to delete them locally and remotely
#!/bin/bash
for gitBranch in "$@"
do
git branch -d "$gitBranch"
git push origin :"$gitBranch"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment