If we want to create a repository in Git, then we need to run the command “git init”. With this command .git repository, we can create a directory in the project directory.