Created
May 6, 2019 17:17
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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