Created
January 3, 2020 17:51
-
-
Save rubberduck203/8eb0078ec85c0857a2166d429d566073 to your computer and use it in GitHub Desktop.
Powershell function for deleting merged git branches
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
function Delete-MergedBranches() { | |
Foreach($branch in (git branch --merged master | Select-String ".*master" -NotMatch)) { | |
git branch -d $branch.ToString().Trim() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment