Git Objects appears to be quite sparse

Viewed 32

I just cloned a repository used to teach a Git course.

There are a lot of files.

C:\udacity-git-project\course-git-blog-project>git ls-files -s
100644 779f99a12b5c71692ad6d6908d6d2fc3bdba485d 0       .editorconfig
100644 60bbd99bef24135db73624cd32bbbcb73f5676a5 0       .eslintrc.json
100644 ebf1b6ef3591e9b76a1e1a25c26401e3e2bebc64 0       .gitattributes
100644 7fbd1b9f6cbac68e0eba136e58c5000d0975c826 0       .github/workflows/manual.yml
100644 370ba7865aae52e2554c61ae14612be8eeffc620 0       .gitignore
100644 37398011dd64092b22bb120c30804b4eb319ab16 0       .htmlhintrc
100644 4c9f58ce3c76f4f1ca394eb00f92ec704210b2a2 0       .stylelintrc
100644 957f44639c661958595fcb986190500493c44428 0       README.md
100644 3cbd0b856634d2ed60e295c0c717c90c87e0855c 0       css/app.css
100644 452a01fd62ba8ca3069f895dfc122d43a2f58950 0       css/normalize.min.css
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0       img/.gitkeep
100644 01b90404216bdf242800b864dc89a377c2c33d61 0       img/chasing-the-snow.jpg
100644 3b939d342dd81153cb989d8719902aa09aec4c87 0       img/headerimage.jpg
100644 8aaf2ec26b503240d23c7fadb294687d0c657e6d 0       img/profilepic.jpg
100644 ba03fa8fdf5c562b65127c4aa394e3c0f4d15a42 0       img/seeing-clearly.png
100644 e86eedc5ec5a84414b48863f57c1c2f815637085 0       img/social-google.png
100644 960844320146b0ce43f8aef256e667aad5d0c6ac 0       img/social-instagram.png
100644 6bbd0e143045149de4cb87a61e9b10da63b2c5fc 0       img/social-twitter.png
100644 aed964fe33086765d93a1621b42e1b420d7593ac 0       img/something-to-remember.jpg
100644 368146cdf4b7d5b5af89c980f2aa6027af4358d8 0       img/village-in-the-valley.jpg
100644 5419b8c92479af667a6fd05c7b0f8314597cac63 0       index.html
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0       js/app.js

So when I went into .git\objects, I was expecting to see lots of object foders related to these objects. i.e. a folder for each of the first two characters of all the sha numbers generated. But I only have a very small number.

I am running Git on windows.

C:\udacity-git-project\course-git-blog-project\.git\objects>dir
 Volume in drive C is OSDisk
 Volume Serial Number is 36E9-84F4

 Directory of C:\udacity-git-project\course-git-blog-project\.git\objects

02/07/2021  12:00    <DIR>          .
02/07/2021  12:00    <DIR>          ..
02/07/2021  12:00    <DIR>          32
02/07/2021  11:59    <DIR>          54
02/07/2021  12:00    <DIR>          a8
01/07/2021  09:15    <DIR>          b7
30/06/2021  16:06    <DIR>          info
30/06/2021  16:06    <DIR>          pack
               0 File(s)              0 bytes
               8 Dir(s)  99,794,542,592 bytes free
1 Answers

The other objects are packed in your .git/objects/pack here. (see doc)

Git periodically packs objects to save space.

Use git verify-pack -v .git/objects/pack/<some_pack> to check contents of a pack.

Related