<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">

<sect2 lang="en" id="git-count-objects(1)">
    <title>git-count-objects(1)</title>
    <date>2024-07-02</date>
<revhistory><revision><date>2024-07-02</date></revision></revhistory>
<indexterm>
<primary>git-count-objects(1)</primary>
</indexterm>
<simplesect id="git-count-objects(1)__name">
<title>NAME</title>
<simpara>git-count-objects - Count unpacked number of objects and their disk consumption</simpara>
</simplesect>
<simplesect id="git-count-objects(1)__synopsis">
<title>SYNOPSIS</title>
<blockquote>
<literallayout><emphasis>git count-objects</emphasis> [-v] [-H | --human-readable]</literallayout>
</blockquote>
</simplesect>
<simplesect id="git-count-objects(1)__description">
<title>DESCRIPTION</title>
<simpara>Counts the number of unpacked object files and disk space consumed by
them, to help you decide when it is a good time to repack.</simpara>
</simplesect>
<simplesect id="git-count-objects(1)__options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
-v
</term>
<term>
--verbose
</term>
<listitem>
<simpara>
        Provide more detailed reports:
</simpara>
<simpara>count: the number of loose objects</simpara>
<simpara>size: disk space consumed by loose objects, in KiB (unless -H is specified)</simpara>
<simpara>in-pack: the number of in-pack objects</simpara>
<simpara>size-pack: disk space consumed by the packs, in KiB (unless -H is specified)</simpara>
<simpara>prune-packable: the number of loose objects that are also present in
the packs. These objects could be pruned using <emphasis>git prune-packed</emphasis>.</simpara>
<simpara>garbage: the number of files in the object database that are neither valid loose
objects nor valid packs</simpara>
<simpara>size-garbage: disk space consumed by garbage files, in KiB (unless -H is
specified)</simpara>
<simpara>alternate: absolute path of alternate object databases; may appear
multiple times, one line per path. Note that if the path contains
non-printable characters, it may be surrounded by double-quotes and
contain C-style backslashed escape sequences.</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-H
</term>
<term>
--human-readable
</term>
<listitem>
<simpara>
Print sizes in human readable format
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="git-count-objects(1)__git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
</simplesect>
</sect2>
