# Git in a Nutshell

Lets talk in detail how the whole git system works . what happens when we run a command inside the git and how git manages to track the project with this much accuracy without any conflits.

### Understanding Git Folder

when we enter the command git init it initializes a folder with a lot sub directries which we will talk about in this blog

### HEAD Directory

The HEAD directory contains the head commit HASH . In this way the git knows about the head commit .

### OBJECT DIRECTORY

Whenever any commit is made a directory with the first two letters of hash is made in the objects folder which tracks the changes related to the recent commit that was made it would only track the changes related to the last commit

### CONFIG DIRECTORY

The config directory consists of 3 parts . Core ,

### CORE

This contains the repository format version .

### Remote Origin

This contains the remote origin details like the address of remote repository which is used to pull and push data.

### BRANCH REFRENCE

This also contains the branch refrence which can used to know about the current branch

### REFS DIRECTORY

the refs directly contains two folders heads

### Head folder

This contains the hash of current head commit
