# 使用 Homebrew, apt, Nix 安装 git-delete-merged-branches

查看 git-delete-merged-branches 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:git-delete-merged-branches
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install git-delete-merged-branches
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install git-delete-merged-branches
```

  证据: Debian stable package indexes: git-delete-merged-branches from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#git-delete-merged-branches
```

  证据: nixpkgs package indexes: pkgs/by-name/gi/git-delete-merged-branches/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:git-delete-merged-branches
- **软件包管理器:** Homebrew
- **版本:** 7.6.1
- **来源摘要:** Command-line tool to delete merged Git branches
- **主页:** <https://github.com/hartwork/git-delete-merged-branches>
- **最后更新:** 2026-07-23T20:48:43Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- git-dmb (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 7.6.1
## 项目历史与用法

git-delete-merged-branches is a Python command-line tool for cleaning up local and remote Git branches after their work has been merged. Its package installs the shorter `git-dmb` executable and documents safety-focused branch deletion.

### 项目历史

The upstream Git history begins in July 2020 with code for version 1.0.0. The project advanced quickly through early releases and later settled into a maintained CLI with tests, pre-commit integration, and package-manager distribution.

The README frames the tool around safe cleanup rather than raw deletion. It detects multiple forms of de-facto merges, including rebase merges, squash merges with extra effort, and cherry-picks by leveraging `git cherry`; it also supports workflows with multiple release branches.

### 采用历史

The official README lists install paths through pip and distribution packages including Arch AUR, Debian, Gentoo, Homebrew, MacPorts, NixOS, Ubuntu, and Void Linux. That makes the tool visible in the same package-manager space as Git workflow helpers rather than only as a Python package.

Its README also documents a command-name clash with git-extras, whose utility collection ships a simpler `git-delete-merged-branches` script. The standalone project responds by offering `python3 -m git_delete_merged_branches` and `git-dmb` invocation paths.

### 使用方式

Practitioners run it inside a repository to update remotes, fast-forward tracked release branches, list local and remote branches that appear merged, and ask before deletion. A `--dry-run` mode lets users inspect actions first, and `--verbose` shows Git commands.

The tool is used when teams accumulate topic branches across local clones, forks, and remote hosts. It is provider-agnostic and documents use with GitHub, GitLab, Gitea, and other Git hosting because it works through Git commands rather than a hosting API.

### 为什么软件包爱好者会关心

The package is a good example of a small workflow CLI whose value lies in guardrails: branch deletion is risky, so the project packages conservative prompts, dry runs, `--force-with-lease`, and no shell-command construction.

Its overlap with git-extras is package-manager-relevant because PATH order can decide which command a user runs when both packages are installed.

### 时间线

- 2020: The repository begins with version 1.0.0 code.
- 2020: Rapid 1.x through 6.x releases establish the CLI and packaging shape.
- 2021: Version 6.4.0 continues the maintained Python CLI line.
- 2022: Version 7.4.0 lands after several 7.x releases.
- 2025: Version 7.5.0 is released.
- 2026: Version 7.6.0 is released.

### Related projects

- git-extras is a related utility collection and a direct command-name conflict noted by the README.
- GitHub's automatic deletion of branches for merged pull requests is mentioned as a complementary hosting-side cleanup feature.
- `git cherry` is the Git command named by the README as part of merge-detection logic.

### 来源

- <https://formulae.brew.sh/formula/git-delete-merged-branches documents Homebrew packaging.>
- <https://github.com/hartwork/git-delete-merged-branches documents installation, examples, features, safety rules, best practices, and the git-extras command-name clash.>
- <https://github.com/hartwork/git-delete-merged-branches/releases documents release progression.>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - git-delete-merged-branches - 7.5.0-1: normalized package name match | Debian stable package indexes: git-delete-merged-branches from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line tool to delete merged git branches | https://github.com/hartwork/git-delete-merged-branches
- Debian apt - python3-git-delete-merged-branches - 7.5.0-1: normalized package name match | Debian stable package indexes: python3-git-delete-merged-branches from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line tool to delete merged git branches (Python module) | https://github.com/hartwork/git-delete-merged-branches
- Nix - git-delete-merged-branches: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/git-delete-merged-branches/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - git-delete-merged-branches - 7.4.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: git-delete-merged-branches from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line tool to delete merged git branches | https://github.com/hartwork/git-delete-merged-branches
- Ubuntu apt - python3-git-delete-merged-branches - 7.4.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-git-delete-merged-branches from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line tool to delete merged git branches (Python module) | https://github.com/hartwork/git-delete-merged-branches


## Combined YAML source

View the package source record on GitHub. [combined/git-delete-merged-branches.yml](https://github.com/mxcl/pkgdb/blob/main/combined/git-delete-merged-branches.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
