Last active
January 3, 2016 11:09
-
-
Save dva/8454408 to your computer and use it in GitHub Desktop.
Git Flow: Remove feature branches which are merged.
This file contains hidden or 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/sh | |
| # | |
| # Remove feature branches which are merged. | |
| # | |
| OLD_BRANCH=`git branch | awk '/\*/{ print $2 }'` | |
| git checkout develop | |
| git branch --merged | awk '/feature/{ print $1 }' | xargs git branch -d {} | |
| git checkout $OLD_BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment