User Tools

Site Tools


git_count-objects

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

git_count-objects [2019/03/01 10:14] (current)
rpjday created
Line 1: Line 1:
 +===== Overview =====
  
 +How to count objects in the object store.
 +
 +===== SYNOPSIS =====
 +
 +<​code>​
 +git count-objects [-v] [-H | --human-readable]
 +</​code>​
 +
 +===== Basic usage =====
 +
 +Based on current state of "Pro Git" book repo:
 +
 +<​code>​
 +$ git count-objects
 +718 objects, 3120 kilobytes
 +$
 +</​code>​
 +
 +<​code>​
 +$ git count-objects -v
 +count: 718
 +size: 3120
 +in-pack: 10966
 +packs: 6
 +size-pack: 175419
 +prune-packable:​ 45
 +garbage: 0
 +size-garbage:​ 0
 +$
 +</​code>​
 +
 +You can always invoke garbage collection to pack:
 +
 +<​code>​
 +$ git gc
 +Enumerating objects: 11317, done.
 +Counting objects: 100% (11317/​11317),​ done.
 +Delta compression using up to 8 threads
 +Compressing objects: 100% (4606/​4606),​ done.
 +Writing objects: 100% (11317/​11317),​ done.
 +Total 11317 (delta 6846), reused 10610 (delta 6370)
 +$
 +</​code>​
 +
 +after which:
 +
 +<​code>​
 +$ git count-objects -v
 +count: 31
 +size: 128
 +in-pack: 11317
 +packs: 1
 +size-pack: 174725
 +prune-packable:​ 0
 +garbage: 0
 +size-garbage:​ 0
 +$
 +</​code>​
git_count-objects.txt ยท Last modified: 2019/03/01 10:14 by rpjday