Skip to content

Commit 1d1edec

Browse files
committed
Update
1 parent fc5d146 commit 1d1edec

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

git-delete-orphan-branches

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/usr/bin/env bash
22

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
3+
# 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

Comments
 (0)