Tasty Git | 9th bite | Repository

Mitchell Coutinho
2 min readNov 1, 2022

A series of bite-size articles about the version control system known as Git!

Git logo

Repository

You inform Git that you want it to manage file versions for a certain project by pointing it to that project’s directory. When you do this, Git creates a new directory inside of the project’s directory called .git .

Such a nested .git directory is called a repository. Git uses this folder to store all the information it needs to perform version management tasks on that project. This includes the entire version history containing all prior stored copies of your project files, and the index that you’ve learned about.

When you download a project from an online environment such as GitHub, it is this .git directory that gets downloaded. Because Git is a distributed VCS, this directory contains the full history of the project, including all file versions that have existed.

When you synchronize your local repository with a remote server such as GitHub, the relevant parts of your local .git directory are synchronized with the information stored by the remote server.

The .git directory name starts with a dot to indicate to the operating system and to users that it should be treated as invisible. This is because the contents are managed by Git, and don’t need to be edited by you.

If your operating system is configured to hide such folders, then you may not see one in your local projects even if it’s there. You could change your system settings to show such folders if you want to peek inside.

Still hungry? Take the next bite →

--

--

Mitchell Coutinho

A web developer and solution architect that likes to share. Currently working at Ordina.