We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc5d146 commit 1d1edecCopy full SHA for 1d1edec
1 file changed
git-delete-orphan-branches
@@ -1,3 +1,7 @@
1
#!/usr/bin/env bash
2
3
-git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D "$branch"; done
+# Old way, works but doesn't find all
4
+# git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D "$branch"; done
5
+
6
+# New way, using a gh extension (obviously only for github)
7
+gh poi
0 commit comments