Created
March 29, 2018 16:10
-
-
Save owen2/e5d8b24d5015c6db286666883dba9694 to your computer and use it in GitHub Desktop.
Delete merged 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
git branch --merged | %{$_.trim()} | ? {$_ -notmatch 'master'} | %{git branch -d $_} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Warning, this is a note mostly for me, and makes some assumptions about your workflow. Read carefully before running!
It's going to delete branches that are merged into master.