🗑 git-tidy

Delete local git branches that have a remote tracking branch that is : gone
.

Installation
Homebrew
$ brew tap drewwyatt/tap
$ brew install git-tidy
Snapcraft · 
$ sudo snap install git-tidy
Go
$ go get -u github.com/drewwyatt/git-tidy
Usage
$ git tidy # executes "git branch -d" on ": gone" branches
With force delete
$ git tidy -f # same as above, but with "-D" instead of "-d"
# or
$ git tidy --force
Interactive
Present all ": gone" branches in a checkbox list, allowing user to opt-in to deletions.
$ git tidy -i
# or
$ git tidy --interactive
# with force
$ git tidy -if
# or
$ git tidy --interactive --force
Path
By default, tidy
will execute all commands in the current directory (.
), however, you can pass a path to another git repository after any/all other flags.
$ git tidy ../some/other/repo
# with flags
$ git tidy -if ../some/other/repo