Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The .git directory

The following folder and files are created when we run git init.

  • branches/
  • index - also called staging area
  • config holds your project specific configuration.
  • description
  • HEAD contains the name of the currently checked out branch or SHA.
  • hooks/ the local and remote hooks.
  • info/
  • objects/ holds the objects (blob, tree, commit)
  • refs/ holds references to objects