Understanding Git Objects

πŸ” What you'll learn: Ever wondered what happens when you run git add or git commit? This step-by-step demo reveals the three building blocks of Gitβ€”blobs, trees, and commitsβ€”and how they connect to form your project's history.

1
What is a Blob?

In Git, a file's content is stored as a "blob"β€”just the raw data, without the filename or any other info.

File Content (hello.txt)
Hello World!
β†’
BLOB
Hello World!
a1b2c3d4...
Key Point: The blob gets a unique SHA hash based on its content. Identical content always produces the same hash.