You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Basti 4b55e462b4 Update deps 14 hours ago
.github/workflows Fix job name 3 months ago
scripts Add small release script 3 months ago
src Fetch via git fetch 3 months ago
.gitignore cargo init 1 year ago Release 0.3.0 3 months ago
Cargo.lock Update deps 14 hours ago
Cargo.toml Release 0.3.0 3 months ago
LICENSE cargo init 1 year ago Remove badge 14 hours ago


git-gone lists and prunes “gone” branches.

A “gone” branch is a local branch whose upstream branch no longer exists. This frequently occurs in a pull request workflow:

  1. You create a local branch, push it and create a pull request.
  2. A reviewer merges the pull request and deletes the branch on the server.
  3. Your local branch still lingers in your clone.

Over time and after many pull request you accumulate many of these branches which reference long-merged pull requests and serve no further purpose.

git gone can list these branches and automatically prune them from your clone to cleanup the debris of pull requests.


To fetch and prune and then delete all gone branches:

$ git gone -fv prune

The command prints undo information, so you can always restore a branch if you’d like to keep it.

Alternatively fetch first and then just prune gone branches:

$ git fetch --all --prune
$ git gone prune


Install from

$ cargo install git-gone

The Releases page offers pre-built binaries for common systems.

Prior art and inspiration

All credits for the idea go to Eugene Yokota:


Copyright 2018-2019 Sebastian Wiesner

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.