π The Mathematical Core: Data as Its Own Cryptographic Address
Traditional operating system filesystems locate and retrieve data through Location-Based Addressing: a file is accessed via its mutable path, disk block offset, or inode pointer (e.g., /home/user/src/main.py). If the content of main.py changes, its location remains identical, meaning the address provides zero information about the integrity or historical state of the underlying bytes. Git abandons location-based addressing entirely in favor of Content-Addressable Storage (CAS). In a CAS architecture, data is indexed, retrieved, and verified strictly by computing the Cryptographic Hash of the data itself. If a single bit in a file changes, its address in the storage engine changes completely. This fundamental design ensures that Git objects are immutable, automatically deduplicated across branches, and organized into a tamper-evident Merkle Directed Acyclic Graph (Merkle DAG) where silent alteration of historical code is mathematically impossible.
LOCATION-BASED ADDRESSING VS. CONTENT-ADDRESSABLE STORAGE (CAS):
1. TRADITIONAL OS FILESYSTEM (LOCATION-BASED / MUTABLE INODE POINTERS):
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Path String: /var/www/index.html βββΊ Inode #88412 βββΊ Physical Disk Blocks [1024, 1025] β
β β
β Critical Architectural Properties: β
β β’ Mutable: If an editor overwrites the file, the Inode and Path remain unchanged. β
β β’ Zero Integrity Verification: The OS cannot detect if a cosmic ray or silent disk corruption β
β flipped bits inside the disk blocks without external checksumming. β
β β’ Redundancy Inefficiency: Duplicating a 10MB file into 5 folders consumes 50MB of disk space!β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ (The Git Paradigm Shift)
2. GIT CONTENT-ADDRESSABLE STORAGE (CAS / IMMUTABLE HASH ADDRESSING):
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Raw Data Bytes βββΊ Cryptographic Hash Function (SHA-1 / SHA-256) βββΊ Storage Address (Key) β
β β
β Example: β
β Data: "console.log('Production ready');\n" β
β Hash: 3b4e3e533604c5a9f0d8c5708c5ae48b8846f7ea β
β Disk: .git/objects/3b/4e3e533604c5a9f0d8c5708c5ae48b8846f7ea β
β β
β Revolutionary Architectural Properties: β
β 1. Immutable State : You cannot edit an object. Any modification creates a brand-new object β
β with a completely different cryptographic hash address! β
β 2. Deduplication : If 50 files across 20 branches contain the identical byte payload, β
β Git stores EXACTLY ONE BLOB in .git/objects/, referencing it 50 times! β
β 3. Built-In Integrity: Any hardware corruption, bit rot, or malicious tampering immediately β
β produces a hash mismatch during decompression, exposing corruption. β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
THE RAW GIT OBJECT HEADER CONSTRUCTION SPECIFICATION:
Git does NOT hash raw file content alone!
If you run 'sha1sum' directly on a file, the output will NEVER match Git's object hash!
THE STANDARDIZED UNCOMPRESSED OBJECT PAYLOAD FORMAT:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β [type_ascii] + [space: 0x20] + [content_length_ascii] + [null_byte: 0x00] + [raw_data_bytes] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
WHERE:
β’ type_ascii : The object type string ('blob', 'tree', 'commit', or 'tag').
β’ space (0x20) : Standard ASCII space character separating type from size.
β’ content_length_ascii: The exact size of raw_data_bytes expressed as an ASCII integer string.
β’ null_byte (0x00) : 1-byte binary null terminator (\0) delineating metadata from payload.
β’ raw_data_bytes : The literal binary/text data of the file.
STEP-BY-STEP CALCULATION OF A BLOB HASH:
Let our input data be: "Hello World\n" (Length = 12 bytes including newline).
Step 1: Construct the formatted header string:
"blob 12\0"
(Hexadecimal: 62 6c 6f 62 20 31 32 00)
Step 2: Append the raw content bytes:
"blob 12\0Hello World\n"
(Total byte length = 8 bytes header + 12 bytes data = 20 bytes total).
Step 3: Compute the SHA-1 cryptographic digest over the combined 20 bytes:
SHA-1("blob 12\0Hello World\n") = 557db03de997c86a4a028e1ebd3a1ceb225be238
Step 4: Verify against Git's native plumbing command:
$ echo "Hello World" | git hash-object --stdin
Output: 557db03de997c86a4a028e1ebd3a1ceb225be238 <-- PERFECT 100% MATCH!
THE SHA-1 COLLISION ATTACK & GIT DEFENSES:
WHAT IS A HASH COLLISION?
A collision occurs when two completely distinct input byte streams M1 and M2 produce the
identical cryptographic hash: SHA-1(M1) == SHA-1(M2), where M1 != M2.
THE SHAttered ATTACK (GOOGLE & CWI AMSTERDAM, FEBRUARY 2017):
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β’ Researchers engineered two distinct PDF documents with entirely different visual content β
β (PDF A showed a blue background; PDF B showed a green background). β
β β’ Both files hashed to the identical 160-bit SHA-1 digest: β
β 38762cf7f55934b34d179ae6a4c80cadccbb7f0a β
β β’ Computational Effort: ~9 quintillion SHA-1 computations (equivalent to 6,500 CPU years). β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
HOW AN ATTACKER COULD THEORETICALLY EXPLOIT SHA-1 IN A SOFTWARE REPOSITORY:
1. Attacker crafts two files: BenignCode.c and MaliciousTrojan.c with identical SHA-1 hashes.
2. Attacker submits BenignCode.c to security reviewers in a pull request; PR is approved.
3. In the repository object database, the object hash is identical for both files.
4. During deployment, the attacker replaces BenignCode.c with MaliciousTrojan.c.
5. Git's CAS sees the identical hash and assumes the file is already present and uncorrupted,
deploying the malware to production!
GIT'S IMMEDIATE COUNTERMEASURE: SHA-1DC (SHA-1 DETECT-COLLISION):
β’ In Git v2.13.0, Linus Torvalds and the core team replaced generic SHA-1 with SHA-1DC
(developed by Marc Stevens).
β’ SHA-1DC inspects incoming byte streams for specific mathematical patterns known as
"difference paths" required to construct differential cryptanalytic collisions.
β’ If a collision attempt is detected, SHA-1DC alters the internal hash computation to abort
the operation, neutralizing SHAttered attacks on Git without breaking backward compatibility!
extensions.objectFormat configuration, repository initialization with SHA-256, hash interoperability translation tables, and loose object directory structures.
THE TRANSITION TO 256-BIT CRYPTOGRAPHY: SHA-1 VS. SHA-256:
SPECIFICATION COMPARISON:
βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β ATTRIBUTE β LEGACY OBJECT FORMAT (SHA-1) β MODERN OBJECT FORMAT (SHA-256) β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββ€
β Bit Length β 160 Bits β 256 Bits β
β Hexadecimal Character L β 40 Hex Characters β 64 Hex Characters β
β Collision Security β Vulnerable (~2^60 ops) β 128 Bits (2^128 operations) β
β Loose Shard Directory β 2 hex digits (.git/objects/??)β 2 hex digits (.git/objects/??) β
β Loose Object Filename β Remaining 38 characters β Remaining 62 characters β
βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββ
INITIALIZING A NATIVE SHA-256 REPOSITORY:
$ git init --object-format=sha256 hardened-crypto-repo
$ cd hardened-crypto-repo
INSPECTING THE CONFIGURATION EXTENSION (.git/config):
$ cat .git/config
[core]
repositoryformatversion = 1
[extensions]
objectFormat = sha256
GENERATING A 64-CHARACTER OBJECT HASH:
$ echo "Enterprise Cryptographic Hardening" > security.txt
$ git add security.txt
$ git rev-parse :security.txt
SAMPLE SHA-256 OBJECT HASH OUTPUT:
3b4e3e533604c5a9f0d8c5708c5ae48b8846f7eaee8fb117ad06bdd830b7586c
(Exactly 64 hexadecimal characters long!)
FILESYSTEM STORAGE LOCATION ON DISK:
.git/objects/3b/4e3e533604c5a9f0d8c5708c5ae48b8846f7eaee8fb117ad06bdd830b7586c
CRYPTOGRAPHIC DEDUPLICATION MECHANICS IN PRACTICE:
SCENARIO: An enterprise repository has 50 branches. A 20MB asset file (dataset.json)
is present in all 50 branches. In Subversion, this would consume 1,000MB (1GB) of storage!
HOW GIT ELIMINATES REDUNDANCY VIA CONTENT-ADDRESSING:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BRANCH 'main' : Tree 8841a9... βββΊ points to dataset.json [Blob 3b4e3e...] β
β BRANCH 'feature-auth' : Tree a1b2c3... βββΊ points to dataset.json [Blob 3b4e3e...] β
β BRANCH 'release-v2.0' : Tree c9941a... βββΊ points to dataset.json [Blob 3b4e3e...] β
β β
β PHYSICAL ON-DISK STORAGE (.git/objects/3b/4e3e...): β
β EXACTLY ONE 20MB BLOB OBJECT IS STORED ON DISK! β
β Total Storage Consumed: 20MB (Total Savings: 980MB / 98% Reduction!). β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
DEMONSTRATING DEDUPLICATION USING PLUMBING COMMANDS:
# Step 1: Create 3 identical files with completely different names in different subdirectories
$ mkdir -p src/utils/ docs/
$ echo "import os\nprint('Nikita Infotech')" > src/main.py
$ echo "import os\nprint('Nikita Infotech')" > src/utils/helper.py
$ echo "import os\nprint('Nikita Infotech')" > docs/sample.py
# Step 2: Compute their hashes via git hash-object:
$ git hash-object src/main.py
# Output: a1b2c3d4e5f609871142bc481028841a9bc24d1e
$ git hash-object src/utils/helper.py
# Output: a1b2c3d4e5f609871142bc481028841a9bc24d1e (EXACT SAME HASH!)
$ git hash-object docs/sample.py
# Output: a1b2c3d4e5f609871142bc481028841a9bc24d1e (EXACT SAME HASH!)
# Step 3: Stage all three files into the index
$ git add .
# Step 4: Count the newly created loose objects in .git/objects/
$ find .git/objects/ -type f | wc -l
# Result: EXACTLY ONE new blob object was written to disk!
# Git's index maps three file paths to the exact same content-addressable key!
THE MERKLE DAG HASH CASCADE: HOW GIT PREVENTS SILENT TAMPERING:
Git commits form a Merkle Tree structure where every parent node's cryptographic hash
is determined by the hashes of its child nodes:
βββββββββββββββββββββββββββββββββββββ
β COMMIT OBJECT β
β Hash: 3b4e3e... (Root Commit) β
β - Parent: a1b2c3... β
β - Tree: 8841a9... β
βββββββββββββββββββ¬ββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββ
β ROOT TREE OBJECT β
β Hash: 8841a9... (Root Directory) β
β - "src" βββΊ Tree c9941a... β
β - "README.md" βββΊ Blob f2d1e0... β
βββββββββββββββββββ¬ββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββ
β SUBTREE OBJECT (src/) β
β Hash: c9941a... (Subdirectory) β
β - "auth.js" βββΊ Blob e4f5g6... β
β - "db.js" βββΊ Blob 7a8b9c... β
βββββββββββββββββββββββββββββββββββββ
WHAT HAPPENS IF AN ATTACKER TAMPERS WITH A SINGLE BYTE IN 'auth.js'?:
1. The attacker modifies one character in 'auth.js' to inject a backdoor.
2. The blob hash for 'auth.js' changes: e4f5g6... βββΊ 000000...
3. The Subtree object (src/) incorporates the blob hash; therefore, its tree hash changes:
c9941a... βββΊ 111111...
4. The Root Tree object incorporates the subtree hash; therefore, its root tree hash changes:
8841a9... βββΊ 222222...
5. The Commit object incorporates the root tree hash; therefore, the COMMIT HASH CHANGES:
3b4e3e... βββΊ 333333...
6. The downstream child commit incorporates its parent hash; therefore, EVERY SUBSEQUENT
COMMIT HASH IN THE ENTIRE REPOSITORY LINEAGE CHANGES!
7. The attacker's modified repository branch will be instantly rejected by git push or git fetch
because its cryptographic Merkle chain diverges from the verified remote DAG!
git hash-object to generate keys, write raw data directly to the database (-w), and use git cat-file to inspect object types, sizes, and decompressed payloads.
# ==============================================================================
# INTERACTING DIRECTLY WITH THE CONTENT-ADDRESSABLE DATABASE (PLUMBING)
# ==============================================================================
# 1. Compute the SHA hash of a string WITHOUT writing it to disk:
$ echo "Nikita Infotech Systems" | git hash-object --stdin
# Output: 8841a9bc24d1e0f399a0f441209871142bc48102
# 2. Write the object DIRECTLY into the .git/objects/ database (Flag: -w):
$ echo "Nikita Infotech Systems" | git hash-object -w --stdin
# Output: 8841a9bc24d1e0f399a0f441209871142bc48102
# 3. Verify that Git physically created the loose object on disk:
$ ls -la .git/objects/88/41a9bc24d1e0f399a0f441209871142bc48102
# Output: -r--r--r-- 1 aarav staff 44 Nov 5 12:30 41a9bc24d1e0f399a0f441209871142bc48102
# ==============================================================================
# INSPECTING OBJECTS USING git cat-file:
# ==============================================================================
# Query the TYPE of the object (Flag: -t):
$ git cat-file -t 8841a9bc24d1e0f399a0f441209871142bc48102
# Output: blob
# Query the uncompressed BYTE SIZE of the object (Flag: -s):
$ git cat-file -s 8841a9bc24d1e0f399a0f441209871142bc48102
# Output: 24
# Pretty-print the decompressed PAYLOAD of the object (Flag: -p):
$ git cat-file -p 8841a9bc24d1e0f399a0f441209871142bc48102
# Output: Nikita Infotech Systems
import hashlib
import zlib
import os
from typing import Tuple, Dict, Any
class ContentAddressableStorageEngine:
"""
Pure Python Implementation of Git's Content-Addressable Storage Engine:
1. Formulates raw object payloads conforming to Git's header specification.
2. Supports both legacy SHA-1 (160-bit) and modern SHA-256 (256-bit) modes.
3. Implements 2-character hexadecimal directory sharding.
4. Compresses objects via zlib deflate before writing to disk.
5. Decompresses and verifies objects on read to guarantee integrity.
"""
def __init__(self, storage_root: str = "./mock_git_objects", algorithm: str = "sha1"):
self.storage_root = os.path.abspath(storage_root)
self.algorithm = algorithm.lower()
if self.algorithm not in ["sha1", "sha256"]:
raise ValueError("Algorithm must be 'sha1' or 'sha256'")
os.makedirs(self.storage_root, exist_ok=True)
def _hash_bytes(self, data: bytes) -> str:
if self.algorithm == "sha1":
return hashlib.sha1(data).hexdigest()
return hashlib.sha256(data).hexdigest()
def store_object(self, obj_type: str, data: bytes) -> str:
"""
Formats header: [type] [length]\0[data], computes hash, compresses via zlib,
and writes to [shard]/[remainder] on disk.
"""
# Step 1: Format Git object header
header = f"{obj_type} {len(data)}\0".encode("utf-8")
full_payload = header + data
# Step 2: Compute cryptographic content address
obj_hash = self._hash_bytes(full_payload)
# Step 3: Determine sharded directory path
shard_dir = os.path.join(self.storage_root, obj_hash[:2])
obj_file = os.path.join(shard_dir, obj_hash[2:])
os.makedirs(shard_dir, exist_ok=True)
# Step 4: Write if not already present (Automatic Deduplication!)
if not os.path.exists(obj_file):
compressed_data = zlib.compress(full_payload)
with open(obj_file, "wb") as f:
f.write(compressed_data)
print(f"[+] Written new {obj_type} to CAS: {obj_hash[:16]}... (Deduplication: False)")
else:
print(f"[*] Object {obj_hash[:16]}... already exists in CAS! (Deduplication: True)")
return obj_hash
def retrieve_object(self, obj_hash: str) -> Tuple[str, bytes]:
"""
Retrieves object from disk, decompresses zlib, verifies integrity hash,
and returns (object_type, payload).
"""
shard_dir = os.path.join(self.storage_root, obj_hash[:2])
obj_file = os.path.join(shard_dir, obj_hash[2:])
if not os.path.exists(obj_file):
raise FileNotFoundError(f"Object {obj_hash} does not exist in CAS!")
with open(obj_file, "rb") as f:
compressed = f.read()
decompressed = zlib.decompress(compressed)
# Integrity Check: Recompute hash to verify zero bit rot
computed_hash = self._hash_bytes(decompressed)
if computed_hash != obj_hash:
raise ValueError(f"CORRUPTION DETECTED! Computed {computed_hash} != Address {obj_hash}")
# Parse header
null_idx = decompressed.find(b"\x00")
header = decompressed[:null_idx].decode("utf-8")
payload = decompressed[null_idx + 1:]
obj_type, _ = header.split(" ")
return obj_type, payload
if __name__ == "__main__":
print("==========================================================================")
print(" CONTENT-ADDRESSABLE STORAGE ENGINE DEMONSTRATION")
print("==========================================================================")
# Initialize CAS engine using SHA-256
cas = ContentAddressableStorageEngine(storage_root="./cas_storage_demo", algorithm="sha256")
sample_code = b"function verifySignature() { return crypto.subtle.verify(...); }"
# Store first time
print("[*] Storing source code file in CAS...")
h1 = cas.store_object("blob", sample_code)
print(f" βββ Cryptographic Address: {h1}\n")
# Store identical payload second time (Demonstrating Deduplication)
print("[*] Attempting to store identical content again...")
h2 = cas.store_object("blob", sample_code)
assert h1 == h2, "Hash mismatch on identical content!"
# Retrieve and verify payload
print("\n[*] Retrieving object by cryptographic address...")
recovered_type, recovered_data = cas.retrieve_object(h1)
print(f" βββ Recovered Type : {recovered_type}")
print(f" βββ Payload Content : {recovered_data.decode('utf-8')}")
print(f" βββ Integrity Status : 100% Cryptographically Verified!")
error: object file ... is corrupt, resolving silent bit rot, executing cryptographic file verification via git fsck, and recovering loose objects from packfiles.
OBJECT CORRUPTION FAILURE SCENARIOS & REMEDIATION:
// ==============================================================================
// PITFALL 1: "fatal: loose object ... is corrupt" (BIT ROT / CRC MISMATCH)
// CAUSE: Hard drive bad sector, operating system crash during write, or storage bit rot.
// A loose object in .git/objects/ fails zlib inflation or its computed hash fails to match
// its directory address.
// REMEDIATION WORKFLOW VIA git fsck:
// 1. Run full database cryptographic audit:
// $ git fsck --full --strict
// Output: "error: sha1 mismatch 3b4e3e533604c5a9... .git/objects/3b/4e3e..."
// 2. Identify what file the corrupt object belonged to:
// $ git rev-list --objects --all | grep 3b4e3e533604
// 3. If a remote repository exists (GitHub / backup clone):
// Fetch the clean object from the remote mirror directly without re-cloning!
// $ git fetch origin
// ==============================================================================
// ==============================================================================
// PITFALL 2: MANUALLY EDITING A LOOSE OBJECT BREAKS THE REPOSITORY
// MISTAKE: A developer uses a hex editor to manually change text inside an object file
// in .git/objects/3b/4e3e...
// CATASTROPHE: Git immediately fails on the next command with:
// "fatal: sha1 mismatch 3b4e3e..."
// WHY? The address of the file is '3b4e3e...', but the computed hash of the modified
// bytes is now '8841a9...'. The address NO LONGER MATCHES the data!
// REMEDIATION:
// Never edit files in .git/objects/ directly. If an object is damaged and no remote
// backup exists, use 'git cat-file' or Python zlib scripts to recover surviving data,
// write it via 'git hash-object -w', and point the reference to the new hash.
// ==============================================================================
CONTENT-ADDRESSABLE STORAGE SPECIFICATION MATRIX:
βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β DOMAIN / PARAMETER β LEGACY SPECIFICATION β MODERN STANDARD β CORE OPERATIONAL ROLE β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β Hash Algorithm β SHA-1 (FIPS 180-1) β SHA-256 (FIPS β Computes immutable address β
β β Hardened via SHA-1DC β 180-4 Secure) β for all repository objects β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β Digest Bit Length β 160 Bits β 256 Bits β Cryptographic address size β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β Hex String Length β 40 Hexadecimal characters β 64 Hex charactersβ Human-readable hash identifierβ
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β Payload Header Format β "[type] [size]\0[payload]" β Identical format β Prefixes content with size β
β β (ASCII string + null byte) β across all hashesβ and object type metadata β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β Storage Compression β zlib Deflate (RFC 1951) β zlib Deflate β Compresses loose objects on β
β β Raw compressed byte stream β Raw stream β disk to minimize cluster slackβ
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β Filesystem Sharding β 2-Character Hex Prefix β 2-Character Hex β Partitions objects across 256 β
β β (256 subfolders: 00 to ff) β subfolders β folders to optimize OS inodes β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β Integrity Verification β git fsck --full --strict β git fsck β Cryptographically audits all β
β Tool β β β objects against their hashes β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββ€
β Low-Level Hash Tool β git hash-object -w β git hash-object β Computes object address and β
β β β β writes directly to database β
βββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ€
β TOP 5 CONTENT-ADDRESSABLE STORAGE COMMANDMENTS: β
β 1. Data is Its Own Key: Git indexes objects strictly by the cryptographic hash of their content. β
β 2. Headers Precede Hashes: Git hashes the object type and size along with the raw payload bytes. β
β 3. Identical Content Deduplicates: Storing identical files across branches writes exactly one blob. β
β 4. History Cannot Be Secretly Altered: Tampering with a historical file invalidates the Merkle DAG. β
β 5. SHA-256 is the Future: Modern repositories initialize with '--object-format=sha256' for security. β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ