Created
June 15, 2021 19:28
-
-
Save mattmanning/0c9b069d6c2fbd418a4acf7cb047096e 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
#!/bin/sh | |
# Fetch new remote branches, prune deleted remote branches | |
git remote update -p | |
# Delete local branches for which the remote branch has been deleated | |
git branch --merged | awk '/^ /' | xargs -I $ git branch -d $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment