Skip to content

Instantly share code, notes, and snippets.

@ianlintner-wf
Created June 29, 2016 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianlintner-wf/89944fb44d5b586c3d6dd1333a9e604b to your computer and use it in GitHub Desktop.
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.
#!/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
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