git의 모든 객체 oid는 hash 로 표현
3 types:
- blob: file content
- tree: directory structure containing mode, name, and 20-byte hash repeated
- commit: tree hash, parent(s), author/committer, message, signature
Everything is stored in the format "type + space + length + NUL + content" then compressed with zlib. The filename is a SHA-1 hash (first 2 characters as directory name + remainder as filename).
Handcrafted reverse-engineering hash structure (git object)
Git's internal design is simple and elegant, and once you understand it, implementing it isn't difficult