Some notes about the contents of the .git directory that resides in the root of a git repository.
configfile: contains project-specific configurationsinfo/excludefile: ignore patterns in addition to.gitignorefiles but not trackedhooksdirectory: client- or server-side hook scriptsHEADfile: points to the currently checked out branchobjectsdirectory: stores the content of the git databaserefsdirectory: stores pointers to commit objects (branches)indexfile: staging area informationdescriptionfile: only used by the GitWeb program
For submodules the directory is in the .git directory of the main repository (“supermodule”).
The .git directory of a repository can be shown with git rev-parse --git-dir