Git - Hash (Message Digest / Hash Object / SHA1)

About

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 also called an extended SHA-1 syntax.

Where is the Git Hash function ?

The function is available via the hash-object command

Example for a blob

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

Powered by ComboStrap