← 返回命令列表

Linux command

git-sizer 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Analyze repository size

git-sizer

Verbose output

git-sizer -v

JSON output

git-sizer --json

Show only critical

git-sizer --critical

说明

git-sizer computes various size metrics for a Git repository, identifying potential performance problems such as oversized files, deep histories, or wide directory trees. The tool reports metrics with concern levels shown as asterisks (*), helping maintainers understand whether their repository structure may cause issues with cloning, fetching, or general Git operations. It must be run from within a Git repository.

参数

-v, --verbose
Report all statistics, equivalent to --threshold=0
--json
JSON output format
--json-version _n_
JSON format version (1 or 2)
--threshold _n_
Minimum concern level to report (0=all, 1=default, 30=critical only)
--critical
Only report critical statistics (equivalent to --threshold=30)
--names _mode_
Display names of large objects (none, hash, or full)
--no-progress
Suppress progress output
--show-refs
List the references being processed
--version
Display version information

FAQ

What is the git-sizer command used for?

git-sizer computes various size metrics for a Git repository, identifying potential performance problems such as oversized files, deep histories, or wide directory trees. The tool reports metrics with concern levels shown as asterisks (*), helping maintainers understand whether their repository structure may cause issues with cloning, fetching, or general Git operations. It must be run from within a Git repository.

How do I run a basic git-sizer example?

Run `git-sizer` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -v, --verbose do in git-sizer?

Report all statistics, equivalent to --threshold=0