If you have a project that is not currently using Git version control, you can use the following command to initialize the project:
git init
When you run the preceding command, the Git program that you have installed in your machine creates a .git directory in the project directory and starts tracking the source code of that project. After you initialize Git in a new project, all the files are displayed as Modified and you have to stage those files to commit those changes.