Create and navigate to the first_repo directory:

mkdir first_repo
cd first_repo

Repository initialization is performed using the git init command:

[~/tools/first_repo]
$ git init
Initialized empty Git repository in /home/vagrant/tools/first_repo/.git/

After executing this command, a .git folder is created in the current directory, which contains the service files required by Git.

Displaying repository status in invitation

This is additional functionality that is not required for working with Git, but it helps a lot. When working with Git, it is very convenient to be able to immediately determine whether you are in a regular directory or in a Git repository. In addition, it would be good to understand the status of the current repository. To do this, you need to install a special utility that will show the status of the repository. To install the utility, you need to copy its repository to the home directory of the user under whom you are working: