# 使用 Homebrew, dnf, MacPorts, Nix, apt 安装 git-tools

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

## 安装

```sh
sudo av install brew:git-tools
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install git-tools
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install git-tools
```

  证据: MacPorts ports tree: devel/git-tools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- dnf (92%):

```sh
sudo dnf install git-tools
```

  证据: Fedora Rawhide package metadata: git-tools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#git-tools
```

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

- Debian apt (92%):

```sh
sudo apt install git-restore-mtime
```

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

## 软件包事实

- **软件包键:** brew:git-tools
- **软件包管理器:** Homebrew
- **版本:** 2025.08
- **来源摘要:** Assorted git-related scripts and tools
- **主页:** <https://github.com/MestreLion/git-tools>
- **仓库:** <https://github.com/MestreLion/git-tools>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- git-branches-rename (别名)
- git-clone-subset (别名)
- git-find-uncommitted-repos (别名)
- git-rebase-theirs (别名)
- git-restore-mtime (别名)
- git-strip-merge (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Git Tools is Rodrigo Silva's collection of small Git-related command-line utilities, distributed as normal `git-*` executables with optional man pages. The suite covers repository maintenance and migration chores that are useful but too specific to belong in core Git.

### 项目历史

The upstream repository was created in 2012, and the README says the tools have been tested against Git versions dating back to 2010. The collection is built from Bash utilities plus a Python utility, git-restore-mtime, which became the most visible member of the set.

### 采用历史

The README explicitly credits git-restore-mtime as the reason the repository was packaged into distributions. It lists Debian, Ubuntu, Linux Mint, Fedora, EPEL-based systems, Gentoo, Arch AUR, Homebrew, MacPorts, Kali Linux, MidnightBSD mports, and Mageia as distribution channels or package ecosystems for the tools.

### 使用方式

Practitioners use the tools as Git subcommands after placing the executables in PATH or installing an operating-system package. Examples include restoring file modification times from commit history, finding repositories with uncommitted changes, cloning a subset of a repository while preserving relevant history, renaming branch prefixes, and stripping files before a merge.

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

Git Tools is a classic package-manager-friendly utility collection: small scripts, man pages, no daemon, and names that Git automatically discovers as subcommands. Its packaging story also shows how one highly useful script, git-restore-mtime, can pull a broader toolbox into distro archives.

### 时间线

- 2010: README says the tools were tested against Git versions dating back to this era.
- 2012: GitHub repository created and copyright notice added for Rodrigo Silva.
- 2020: Debian oldoldstable carried git-mestrelion-tools 2020.09-1.
- 2022: Debian stable line carried git-mestrelion-tools 2022.12-1.

### Related projects

- The suite extends Git and overlaps with shell scripts, Git aliases, and individual packaging of git-restore-mtime in Debian-derived systems.

### 来源

- <https://api.github.com/repos/MestreLion/git-tools>
- <https://formulae.brew.sh/formula/git-tools>
- <https://github.com/MestreLion/git-tools>
- <https://github.com/MestreLion/git-tools/tree/main/man1>
- <https://raw.githubusercontent.com/MestreLion/git-tools/main/README.md>
- <https://tracker.debian.org/pkg/git-mestrelion-tools>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Nix - git-tools: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/git-tools/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - git-tools - 2025.08-3.fc45: normalized package name match | Fedora Rawhide package metadata: git-tools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Assorted git-related scripts and tools | https://github.com/MestreLion/git-tools
- MacPorts - git-tools: normalized package name match | MacPorts ports tree: devel/git-tools/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Debian apt - git-restore-mtime - 2022.12-1: installed executable or alias match | Debian stable package indexes: git-restore-mtime from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | set timestamps to the date of a file's last commit | https://github.com/MestreLion/git-tools
- Ubuntu apt - git-restore-mtime - 2022.12-1: installed executable or alias match | Ubuntu 24.04 LTS package indexes: git-restore-mtime from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | set timestamps to the date of a file's last commit | https://github.com/MestreLion/git-tools


## Combined YAML source

View the package source record on GitHub. [combined/git-tools.yml](https://github.com/mxcl/pkgdb/blob/main/combined/git-tools.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
