Created
February 21, 2018 14:28
-
-
Save kutyel/9b51c4350f07cc85f71e0e73e2788b1a to your computer and use it in GitHub Desktop.
Fish function that removes all the local git branches that have already been merged
This file contains hidden or 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 clear_local_branches --description 'Removes all the local branches that have already been merged' | |
command git fetch -p; and git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment