Created
September 7, 2015 16:06
-
-
Save neverendingqs/cec188d23afe9621fa01 to your computer and use it in GitHub Desktop.
Delete all local branches that has been merged on remote.
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
# Can also add to PowerShell profile | |
function Git-RemovedMergedBranches { | |
git branch --merged | | |
? { $_ -NotMatch "^\*" } | | |
? { $_ -NotMatch "master" } | | |
% { $_.Trim() } | | |
% { git branch -d $_ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment