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 | |
# Go through all the branches except the current active, asking whether it should | |
# be preserved or removed. Delete all marked for removal in the second iteration. | |
branches=() | |
while IFS= read -rs line ; do | |
branches+=("${line:2}") | |
done < <(git branch) |