Created
March 16, 2025 21:23
-
-
Save arjshiv/66f5838526f235b0278c18296a054203 to your computer and use it in GitHub Desktop.
bash snippet to pull main branch and delete any closed or deleted branches from the origin
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
git checkout master && git pull origin && git remote prune origin && git gc && git branch --v | grep "\[gone\]" | awk '{print $1}' | xargs git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment