.git directory in Git repository

.git directory stores all important information about the Git repository.

It is present in your git repository directory as shown in below image.

.git directory after excuting git init command

.git directory 

Let us take a look at the significance of each of these files and directories.

  1. hooks – actions to be takes after certain event like commit, update etc.
  2. info
  3. objects
  4. refs – list of all refs like heads, tags etc
  5. config – tells if repository is bare or not. Also contains lot of configuration settings like user name, email address, remotes
  6. description – Name of the repository
  7. HEAD – current ref

You may also like...