# 使用 Homebrew, apk, apt, MacPorts, Nix, pacman, scoop, winget 安装 git-sizer

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install git-sizer
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install git-sizer
```

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

### Linux

- apk (92%):

```sh
sudo apk add git-sizer
```

  证据: Alpine Linux edge package indexes: git-sizer from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install git-sizer
```

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

- Nix (92%):

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

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

- pacman (92%):

```sh
sudo pacman -S git-sizer
```

  证据: Arch Linux sync databases: git-sizer from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/git-sizer
```

  证据: Scoop official bucket manifest trees: bucket/git-sizer.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id GitHub.git-sizer -e
```

  证据: Windows Package Manager source index: GitHub.git-sizer from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:git-sizer
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/git-sizer>
- **版本:** 1.5.0
- **来源摘要:** Compute various size metrics for a Git repository
- **主页:** <https://github.com/github/git-sizer>
- **仓库:** <https://github.com/github/git-sizer>
- **许可证:** MIT
- **源码归档:** <https://github.com/github/git-sizer/archive/refs/tags/v1.5.0.tar.gz>
- **最后更新:** 2026-07-27T14:57:49+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- git-sizer (cli)
- git-sizer (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.5.0
- 管理器更新时间: 2026-07-27
- 本地数据: OK
- 上游仓库: https://github.com/github/git-sizer
- 检测到的最新版本: v1.5.0 (当前)
## 项目历史与用法

git-sizer is a GitHub-authored command-line analyzer that measures repository size and shape, then flags characteristics that make Git operations slow, expensive, or inconvenient.

### 项目历史

The GitHub repository began in early 2018 and published v1.0.0 in March 2018. The README presents the tool as a practical diagnostic for repositories that have outgrown Git's comfortable operating range, with checks for large object sets, huge blobs, many references, deep histories, giant trees, long paths, and unusual tag or merge structures.

The project evolved as a Go utility that shells out to Git and reports both human-readable tables and machine-readable JSON. Later releases continued to refine the metric set and output behavior while keeping the core purpose stable: make repository bloat visible before it turns into slow clones, fetches, repacks, garbage collection, and history traversal.

### 采用历史

git-sizer has stronger ecosystem reach than most small Git extensions because it comes from the GitHub organization and is packaged across Homebrew, Chocolatey, Debian, Ubuntu, Arch, MacPorts, Nix, Scoop, and winget. That spread reflects its role as an operations tool for maintainers, enterprise source-control teams, and migration projects rather than a daily porcelain command for every developer.

### 使用方式

Practitioners run git-sizer inside a full, non-shallow clone to get concern-ranked metrics, often using --verbose for a complete inventory or --json for automation. The output points maintainers toward remedies such as removing generated files, moving binary assets to Git LFS or git-annex, pruning excess refs, splitting subprojects, or reshaping directories.

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

Package maintainers care about git-sizer because source archives, fetch times, build farms, mirrors, and monorepo migrations all suffer when repository topology gets pathological. It gives a repeatable vocabulary for discussing repository health without requiring a custom Git forensics script.

### 时间线

- 2018: GitHub repository and initial implementation appeared.
- 2018: v1.0.0 release published.
- 2021: v1.4.0 and v1.5.0 releases expanded the maintained release line.

### Related projects

- The README points users toward Git LFS and git-annex for large assets and toward Git's own maintenance commands when interpreting the cost of repository size.

### 来源

- <https://formulae.brew.sh/formula/git-sizer>
- <https://github.com/github/git-sizer>
- <https://github.com/github/git-sizer/blob/master/README.md>
- <https://github.com/github/git-sizer/releases>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** git-sizer
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - git-sizer - 1.5.0-3+b12: normalized package name match | Debian stable package indexes: git-sizer from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | compute various size metrics for a Git repository | https://github.com/github/git-sizer
- Nix - git-sizer: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/git-sizer/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - git-sizer - 1.5.0-3build1: normalized package name match | Ubuntu 24.04 LTS package indexes: git-sizer from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | compute various size metrics for a Git repository | https://github.com/github/git-sizer
- apk - git-sizer - 1.5.0-r40: normalized package name match | Alpine Linux edge package indexes: git-sizer from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Compute various size metrics for a Git repository | https://github.com/github/git-sizer
- pacman - git-sizer - 1.5.0-3: normalized package name match | Arch Linux sync databases: git-sizer from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Compute various size metrics for a Git repository | https://github.com/github/git-sizer
- MacPorts - git-sizer: normalized package name match | MacPorts ports tree: devel/git-sizer/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/git-sizer: normalized package name match | Scoop official bucket manifest trees: bucket/git-sizer.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - GitHub.git-sizer: normalized package name match | Windows Package Manager source index: GitHub.git-sizer from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [gh](https://pkg.so/zh-hans/brew/gh/) - Shares pkgdb curated category or tags: cli, developer-tools, git.
- [libgit2](https://pkg.so/zh-hans/brew/libgit2/) - Shares pkgdb curated category or tags: cli, developer-tools, git.
- [glab](https://pkg.so/zh-hans/brew/glab/) - Shares pkgdb curated category or tags: cli, developer-tools, git.
- [git-lfs](https://pkg.so/zh-hans/brew/git-lfs/) - Shares pkgdb curated category or tags: cli, developer-tools, git.
- [lazygit](https://pkg.so/zh-hans/brew/lazygit/) - Shares pkgdb curated category or tags: cli, developer-tools, git.
- [bat](https://pkg.so/zh-hans/brew/bat/) - Shares pkgdb curated category or tags: cli, developer-tools, git.
- [git-filter-repo](https://pkg.so/zh-hans/brew/git-filter-repo/) - Shares pkgdb curated category or tags: cli, developer-tools, git.
- [git-delta](https://pkg.so/zh-hans/brew/git-delta/) - Shares pkgdb curated category or tags: cli, developer-tools, git.
- [git-delete-merged-branches](https://pkg.so/zh-hans/brew/git-delete-merged-branches/) - Package names and metadata indicate a similar tool family. Shared terms: cli, developer, developer-tools, git, repository.
- [git-fresh](https://pkg.so/zh-hans/brew/git-fresh/) - Package names and metadata indicate a similar tool family. Shared terms: cli, developer, developer-tools, git, repository.

## Combined YAML source

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


## 来源

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