Last active
November 28, 2019 18:44
-
-
Save joemaffei/3afb9f0f46717fc9fc10b703cafefa6f to your computer and use it in GitHub Desktop.
Delete branches merged to dev (windows terminal)
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
REM Loop through | |
REM (list of branches merged to dev, filter out dev and master, without leading whitespaces) | |
REM and delete each branch | |
FOR /F %i IN ('git branch --merged dev --list "[!dev|master]*" --format "%(refname:short)"') DO git branch -d %i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment