• Stars
    star
    149
  • Rank 248,619 (Top 5 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tidy up stale git branches.

🗑 git-tidy

crates.io

Tidy up stale git branches.

asciicast

Installation

Homebrew

$ brew tap drewwyatt/tap
$ brew install git-tidy

Cargo

$ cargo install git-tidy

⚠️ You may need to update cargo for this ⚠️

If you are seeing an error like the one in this issue:

▪ cargo install git-tidy
    Updating crates.io index
  Installing git-tidy v2.0.1
error: failed to compile `git-tidy v2.0.1`, intermediate artifacts can be found at `/tmp/cargo-installgtcftB`

Caused by:
  failed to select a version for the requirement `zeroize = "^0.9.3"`
  candidate versions found which didn't match: 1.3.0, 1.2.0, 1.1.1, ...
  location searched: crates.io index
  required by package `dialoguer v0.7.1`
      ... which is depended on by `git-tidy v2.0.1`

You can probably fix this by updating cargo with:

rustup update

Previous versions

Newer versions of git-tidy are (for now) only available from Homebrew and crates.io, but you can still get 1.0.0 from the following places:

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 stale (": 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