Created
January 26, 2025 15:18
-
-
Save myinusa/edfb14673ebccceff663b94eef6b29b8 to your computer and use it in GitHub Desktop.
Revisions
-
myinusa created this gist
Jan 26, 2025 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ git fetch --prune --all -v && \ git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -I {} git branch -D {} 2>/dev/null && \ git remote prune origin && \ for b in $(git branch -r | tr '/' ' '); do if [ "$b" != "HEAD" ]; then git checkout "${b#origin/}" && git pull; fi; done