GIT cleanup
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
Get a list of branches | |
for remote in `git branch -r `; do git branch --track $remote; done | |
Remove merged remote branches | |
git branch --merged master | grep -v master | cut -d/ -f2- | xargs -n 1 git push --delete origin | |
Remove merged local branches | |
git branch --merged master | grep -v master | xargs -n 1 git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment