reference: https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain
.git directory structuregit init
.git directory
config
description
HEAD
hooks/
info/
objects/
refs/
description — used by GitWebconfig — project-specific configuration optionsinfo — keeps a global exclude file for ignored patterns not tracked in .gitignorehooks — client- or server-side hook scripts (more https://git-scm.com/book/en/v2/ch00/_git_hooks)HEAD — points to the branch currently checked outindex — Git stores staging informationobjects — stores all the content for your databaserefs — stores pointers into commit objects in that data (branches, tags, remotes, and more)git hash-object → takes some data, stores it into .git/objects and returns a unique key for that object
pack/ and info/ subdirectories