🍺 BREW Explorer

← all formulae

git-trim

brew install git-trim v0.4.4 MIT

Trim your git remote tracking branches that are merged or gone

16
30-day installs · #7356
89
90-day · #5846
954
365-day · #3918
550
★ GitHub stars · updated 6mo ago

Runtime dependencies

Build dependencies

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "pkgconf",
    "rust"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "openssl@3"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Trim your git remote tracking branches that are merged or gone",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:38:06+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "git-trim",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-02-05T18:34:14Z",
  "github_readme_excerpt": "[![CI](https://github.com/foriequal0/git-trim/workflows/CI/badge.svg?event=push)](https://github.com/foriequal0/git-trim/actions?query=workflow%3ACI) [![crates.io](https://img.shields.io/crates/v/git-trim.svg)](https://crates.io/crates/git-trim)\n\ngit-trim\n========\n\n![git-trim Logo](images/logo.png)\n\n`git-trim` automatically trims your tracking branches whose upstream branches are merged or stray.\n\n`git-trim` is a missing companion to the `git fetch --prune` and a proper, safer, faster alternative to your `\u003cbash oneliner HERE\u003e`\n\n[Instruction](#instruction) | [Configurations](#configurations) | [FAQ](#faq)\n\n## Instruction\n\n### Screencast\n\n![git-trim screencast](screencast.png)\n\n### Installation\nDownload binary from [Releases](https://github.com/foriequal0/git-trim/releases), and put it under your `PATH` directories.\n\nYou can also install with `cargo install git-trim` if you have `cargo`.\n\nIt uses [`git2`](https://crates.io/crates/git2) under the hood which depends conditionally on [`openssl-sys`](https://crates.io/crates/openssl) on *nix platform.\nYou might need to install `libssl-dev` and `pkg-config` packages if you build from the source. See: https://docs.rs/openssl/0.10.28/openssl/#automatic\n\n### How to use\n1. Don\u0027t forget to set an upstream for a branch that you want to trim automatically.\n   `git push -u \u003cremote\u003e \u003cbranch\u003e` will set an upstream for you on push.\n1. Run `git trim` if you need to trim branches especially after PR reviews. It\u0027ll automatically recognize merged or stray branches, and delete it.\n1. You can also `git trim --dry-run` when you don\u0027t trust me.\n\n#### Are you using git-flow?\n\nDon\u0027t forget to `git config trim.bases develop,master`.\n\n## Why have you made this? Show me how it works.\n\n### `git fetch --prune` doesn\u0027t do all the works for you\n\nThere are so many lines of commands to type and many statuses of branches that corresponding to PRs that you\u0027ve sent.\nWere they merged or rejected? Did I forget to delete the remote branch after it is merged?",
  "github_repo": "foriequal0/git-trim",
  "github_stars": 550,
  "github_topics": [],
  "homepage": "https://github.com/foriequal0/git-trim",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 16,
  "installs_365d": 954,
  "installs_90d": 89,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "git-trim",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 7356,
  "rank_365d": 3918,
  "rank_90d": 5846,
  "raw_hash": "a3cd5e56e6a6c568",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/g/git-trim.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": null,
  "version_stable": "0.4.4",
  "versioned_formulae": [],
  "why_use_this": null
}