Created
June 7, 2019 13:30
-
-
Save haavamoa/ba1f675e5a6fbd9ea98468b21caaa010 to your computer and use it in GitHub Desktop.
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
################################################################################################# | |
# Checkout master, pull from master, prune master to remove branches that are merged with master | |
################################################################################################# | |
function gitcleanmaster(){ | |
git checkout master | |
git pull | |
git remote prune origin | |
git branch --merged | grep -v "\*" | xargs -rn 1 git branch -d | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment