Last active
January 28, 2019 12:47
-
-
Save OJezu/a6be6ec2529972db8b6c96217f4a1f5a to your computer and use it in GitHub Desktop.
git-fu
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
# delete remote merged branches | |
git branch -r --merged | grep origin | grep -v '>' | grep "^ origin/\(hotfix\|feature\|bugfix\)" | xargs -L1 | cut -d"/" -f 2- | xargs -r git push origin --delete | |
# delete local merged branches | |
git branch --merged | grep "^ \(hotfix\|feature\|bugfix\)" | xargs -L1 | xargs -r git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment