Deletes local or remote branches, except for master
and develop
.
Copy git-clean-branches
to your ~/bin
or wherever.
Delete all merged local branches (except master
and develop
)
$ git clean-branches
Delete all merged remote branches on origin
(except master
and develop
)
$ git clean-branches -r
or
$ git clean-branches --remote
or
$ git clean-branches remote
Delete all merged branches on a different remote
$ git clean-branches -r other-remote