If you accumulate a lot of local Git branches over time, you can get rid of them in one go with the following Nushell script:
nu
(git branch | lines | where ($it !~ '^\*') | each {|br| git branch -D ($br | str trim)} | str trim)
If you accumulate a lot of local Git branches over time, you can get rid of them in one go with the following Nushell script:
(git branch | lines | where ($it !~ '^\*') | each {|br| git branch -D ($br | str trim)} | str trim)