There is a quick way to create local git repository in visual studio. You can create a new git repository while creating the new project from the New Project Dialog Window. In one of our previous post, we have seen how to create a new Git Repository while creating a new project. In Visual Studio, you can quickly create a new git repo from the file menu. Just navigate from File > New and select “Repository“. When you select the new repository option, Visual Studio will bring up the git source control connection tool with the new repository option enable.
Create local git repository in Visual Studio
So, first of all, from the main menu navigate to File > New > Repository
Related Tip: Visualize the Git history in Visual Studio Code
In the team explorer, provide the local repository name and click on the Create.
This will create your local repo and further you can use this repo for any of your projects. You can achieve the same by opening the team explore and then selecting the new repository, however, this is another quick way to create your local repository.
Hope this helps