delete merged branches in git, if you want to.
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
|local current_branch=$(git rev-parse --abbrev-ref HEAD)|
|for branch in $(git branch --merged | cut -c3-)|
|echo "Branch $branch is already merged into $current_branch."|
|echo "Would you like to delete it? [Y]es/[N]o "|
|if [[ $REPLY =~ ^[Yy] ]]; then|
|git branch -d $branch|