Creating a Git repository
From previous lessons, you already know that Git has a special place, similar to a backup folder. This place is called repository. It stores backup copies of the project code, as well as Git settings for this project.
This repository is stored in a special folder .git inside your project. The folder name starts with a dot for a reason. The thing is that under Linux, where Git was originally invented, such a folder will be hidden.
So, let's say we have a test project described in the previous lesson. As we already agreed, it will contain the following files:
- index.html
- styles.css
We want to start working with Git in this project. There is a special command for this, init. Go to the folder with your project in the terminal and enter it:
git init
Initialize a Git repository in your project.
Check that you have a .git folder.