Skip to content

Commit e9c661a

Browse files
DEV: create script to delete local branches that no longer exist on remote
1 parent e868eb8 commit e9c661a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/clear-local-branches.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Delete local branches that no longer exists on remote (windows command line)
2+
git branch -vv | Where-Object { $_ -match 'gone\]' } | ForEach-Object { $_.Trim().Split()[0] } | ForEach-Object { git branch -D $_ }

0 commit comments

Comments
 (0)