# git-count-objects
> 原文: [https://git-scm.com/docs/git-count-objects](https://git-scm.com/docs/git-count-objects)
## 名稱
git-count-objects - 計算解壓縮的對象數及其磁盤消耗
## 概要
```
git count-objects [-v] [-H | --human-readable]
```
## 描述
這會計算解壓縮的目標文件的數量和它們消耗的磁盤空間,以幫助您確定何時是重新打包的好時機。
## OPTIONS
```
-v
```
```
--verbose
```
報告更詳細:
count:松散物體的數量
size:松散對象消耗的磁盤空間,以KiB為單位(除非指定了-H)
in-pack:包內對象的數量
size-pack:包消耗的磁盤空間,以KiB為單位(除非指定了-H)
prune-packable:包中也存在的松散物體的數量。可以使用`git prune-packed`修剪這些對象。
garbage:對象數據庫中既不是有效的松散對象也不是有效包的文件數
size-garbage:垃圾文件占用的磁盤空間,以KiB為單位(除非指定-H)
alternate:備用對象數據庫的絕對路徑;可能會出現多次,每條路徑一行。請注意,如果路徑包含不可打印的字符,則它可能被雙引號括起來并包含C樣式的反斜杠轉義序列。
```
-H
```
```
--human-readable
```
以人類可讀格式打印尺寸
## GIT
部分 [git [1]](https://git-scm.com/docs/git) 套件
- git
- git-config
- git-help
- git-init
- git-clone
- git-add
- git-status
- git-diff
- git-commit
- git-reset
- git-rm
- git-mv
- git-branch
- git-checkout
- git-merge
- git-mergetool
- git-log
- git-stash
- git-tag
- git-worktree
- git-fetch
- git-pull
- git-push
- git-remote
- git-submodule
- git-show
- git-log
- git-shortlog
- git-describe
- git-apply
- git-cherry-pick
- git-rebase
- git-revert
- git-bisect
- git-blame
- git-grep
- gitattributes
- giteveryday
- gitglossary
- githooks
- gitignore
- gitmodules
- gitrevisions
- gittutorial
- gitworkflows
- git-am
- git-format-patch
- git-send-email
- git-request-pull
- git-svn
- git-fast-import
- git-clean
- git-gc
- git-fsck
- git-reflog
- git-filter-branch
- git-instaweb
- git-archive
- git-bundle
- git-daemon
- git-update-server-info
- git-cat-file
- git-check-ignore
- git-checkout-index
- git-commit-tree
- git-count-objects
- git-diff-index
- git-for-each-ref
- git-hash-object
- git-ls-files
- git-merge-base
- git-read-tree
- git-rev-list
- git-rev-parse
- git-show-ref
- git-symbolic-ref
- git-update-index
- git-update-ref
- git-verify-pack
- git-write-tree