.git directory

The hidden directory at the root of a repository where Git keeps all of its data: objects, refs, HEAD, config and the index.

In more detail

Your editor ignores it and you rarely open it, but it is the repository: HEAD names the current branch, refs holds branches and tags, objects holds every commit, tree and file, and config holds local settings. It is never committed itself, which is why hooks inside it do not travel with a clone.

Examples

ls -a
ls .git

Related terms

Taught in

References