Last active
November 28, 2019 18:46
-
-
Save joemaffei/81c5676515bf5c63ff983a9ad947bfa1 to your computer and use it in GitHub Desktop.
Delete branches merged to dev (powershell)
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
# 1. get list of branches merged to dev, filter out dev and master, without spaces in the beginning | |
# 2. delete each branch | |
git branch --merged dev --list "[!dev|master]*" --format "%(refname:short)" | ForEach-Object { git branch $_ -d } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment