Overview
To begin tracking an existing local project folder, open a terminal in that folder and run:
git init
This initializes an empty Git repository inside the current directory. Git creates a hidden directory named .git. That hidden directory contains Git's internal repository data, including information used to track changes, commits, and history.
The project folder remains the working directory. The .git directory is what makes that folder a Git repository.
You can verify that the hidden directory exists with a command that displays hidden files, such as:
ls -la
The .git directory is managed by Git. It is the internal core of the repository rather than an ordinary project folder for manual editing.