Git - Blob

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

  • cat-file is the equivalent of the cat utility
  • the p option to determine automatically the mime





Discover More
Git - Blob

blob in git is a object of the blob type that corresponds / represents the file contents (or inodes) in the git file system. file This command will put a blob in the object database where: the...
Git Commit Tree Data Model
Git - Commit

A commit in git is an object that stores the information : who saved the file system snapshots, when they were saved, why they were saved. the commiter the author the parent commit It's...
Git - File

File management in Git (blob and not directory) blob object on the local file system or not (ie in the git file system database) See and short status A file (or blob) identifier is the...
Git - Hash (Message Digest / Hash Object / SHA1)

git uses as identifier for any object a message digest The hash is known as hash object because the whole git system is based on objects This hash is the unique key that is used in the database It's...
Git - Objects (Database)

An object is the value in the entry of the git database key-value. All entities in git are objects. Objects are the entity of the Git file system. On the operating file system, the objects are stored...
Git File System
Git - Tree Object

In Git, a tree is an object that corresponds to file system directory in the git file system. A single tree object contains: one or more entries, each of which is the SHA-1 hash of a blob or subtree...
Undraw File Manager Re Ms29
What is a Blob (Binary Large Object) ?

blob stands for binary large object and represents the file content in binary data. Because in a computer, all data are binary data, this name is used logically to represent any file content where the...
Git Commit Tree Data Model
What is a git snapshot ?

A git snapshot is a representation of your local file system when a commit is performed. It's attached to each commit. Each new snapshot (ie commit) will create a new Git tree. ie the directory...
Git File System
What is the Git File System ?

git has a file system application feature. The whole git file system is stored in the object database where: the tree objects corresponds to UNIX directory entries (ie directory) and blob objects...
Git - Repository (Directory)

This page is the notion of repository and how it's implemented in Git. The git repository is a subdirectory named .git that contains all repository files. It contains : commit log configuration,...



Share this page:
Follow us:
Task Runner