Table of Contents

Git - Blob

About

blob in git is a object of the blob type that corresponds / represents the file contents (or inodes) in the git file system.

Possible duplicate of file

Management

Put

This command will put a blob in the object database

echo 'test content' | git hash-object -w --stdin

where:

Output:

d670460b4b4aece5915caf5c68d12f560a9fe3e4

The output is a 40-character:

On the file system, you can see its location in the sub-directory object directory from the repository.

find .git/objects -type f
.git/objects/d6/70460b4b4aece5915caf5c68d12f560a9fe3e4

Get

git cat-file -p d670460b4b4aece5915caf5c68d12f560a9fe3e4

where