आंतरिक रूप से, Git एक content-addressable object store है — यह सब कुछ objects (blobs, trees, commits, tags) के रूप में संग्रहीत करता है जिन्हें उनके SHA-1 hash द्वारा पहचाना जाता है। इस मॉडल को समझना Git को सरल बनाता है और यह बताता है कि इसके operations जैसे व्यवहार करते हैं वैसा क्यों करते हैं।
Git एक content-addressable object store है
Git stores 4 types of OBJECTS, each identified by the SHA-1 HASH of its content:
BLOB → file CONTENTS (just the data, no filename)
TREE → a directory: maps names → blobs (files) and trees (subdirs) + permissions
COMMIT → a snapshot: points to a TREE (the root) + parent commit(s) + author/message
TAG → an annotated tag object (points to a commit, with metadata)
→ Content-addressable: an object's ID IS the hash of its content (same content = same hash).
