Created
September 10, 2021 08:52
-
-
Save strokyl/d1365029634e7287cd30a70961319c4f to your computer and use it in GitHub Desktop.
clean git branch
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
#!/bin/bash | |
git branch -d $(git branch --merged=master | grep -v master | grep -v develop) | |
git branch -d $(git branch --merged=develop | grep -v develop | grep -v master) | |
git fetch --prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment