简短回答
这只是 git 命令的输出git count-objects -v
对于推送(当gc
, pull
and clone
)。手册页中的更多信息:git 计数对象 (1).
$ git count-objects -v
...
size: 14 # The "Compressing objects: 100% (14/14)" part (the size in KiB)
in-pack: 22 # The "Counting objects: 22" part (the number of objects)
...
长答案
Counting objects: 22, done.
这是吉特22 个内部对象计入该特定提交。 git 中的几乎所有内容都是对象,并且基本上都是保存在您的.git/对象各自的哈希下的文件夹。手册页中的更多信息:9.2 Git 内部 - Git 对象.
Compressing objects: 100% (14/14), done.
这是 git 在发送之前压缩对象。这14/14是以 KiB 为单位的压缩进度(压缩 14 KiB)。
Writing objects: 100% (14/14), 1.89 KiB | 0 bytes/s, done.
这是 git 发送(如果是远程)和写入对象。这1.89 KiB | 0 字节/秒是以 KiB 为单位的进度和速度(完成时为 0 字节/秒)。
Total 14 (delta 10), reused 0 (delta 0)
这是的输出packfilegit 中的算法(参见9.4 Git 内部结构 - 包文件)并且相当晦涩难懂。它基本上将未使用的对象(通常是较旧的历史记录)打包在.git/对象/包。打包后,git 检查是否可以重用包(因此reused 0部分)。这delta 0部分是从包装或再利用中获得的增益(以 KiB 为单位)。