Created
June 29, 2016 15:38
-
-
Save ianlintner-wf/89944fb44d5b586c3d6dd1333a9e604b to your computer and use it in GitHub Desktop.
Bash script to cleanup git branches on remote repo from a source file.
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
#!/usr/bin/env bash | |
remote_alias=origin | |
while read b; do | |
echo $b | |
#commented for dry run | |
#git branch -d $b | |
#git push origin | |
done <git_remote_branches.txt |
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
old-branch | |
another-old-branch | |
yet-another-branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment