To initialize a Git repository from your existing project or source files, which are not under version control yet, you can go through the following steps:
1. Right-click on the project
Chapter6
, and select Versioning | Initialize Git Repository from the context menu.2. Now, specify the directory path where the repository will be created in the Initialize a Git Repository dialog box. In our case, we choose the same project path.
3. Click on OK and you can check the repository creation progress or status in the Output window (Ctrl+4) as follows:
A
.git
subdirectory will be created under your project directory, where all the data of your project snapshots is stored. Git starts versioning all the files in the specified directory.You can see that all the project file(s) are marked as
-/Added
in the project tree. To view a file status, just hover on the filename, as shown in the following screenshot:We can see that the file status has been displayed...