LinuxmacOSWindows

Where Does git-annex Store File Contents?

git-annex stores file contents in .git/annex/objects, keyed by hash instead of filename.

Last updated

git-annex splits names from bytes. Git tracks small pointer files with normal history, while actual contents live under .git/annex/objects in folders named by backend and hash. Filenames never appear in that tree.

That design makes the objects folder opaque by intent. Never rename inside it by hand. Annex commands move, verify, and prune contents while git handles the pointers. Back up the pointers with git push and the bytes with annex sync to a remote.

Where git-annex stores this, by platform

Linux
[Repo]/.git/annex/objects

Content store keyed by hash, two levels of fanout folders beneath objects. Use git annex commands for every change inside. Pointers in the worktree stay tiny text files.

macOS
[Repo]/.git/annex/objects

Same layout on Mac. Case sensitive hashing matches Linux exactly. Remotes on external drives work through the same objects tree.

Windows
[Repo]\.git\annex\objects

Same tree on Windows. Long path support matters for deep hashes, so enable it when checkouts fail oddly. The v8 unlocked layout keeps usable filenames in the worktree.

Frequently asked questions

Does cloning fetch my annexed files?

No. The annex holds contents while git tracks tiny pointer files, so cloning without annex data gives names without bytes. Run git annex get to fetch contents and git annex drop to release them.

How do I verify annexed contents?

Run git annex fsck to verify present objects against their checksums. Broken keys list for re-fetch from remotes. The command reads the same objects folder, so it catches disk level damage.

Notice an outdated path? Let us know.