Create New Git Repository While Creating New Project in Visual Studio

By | April 12, 2018

We can create a Git Repository at the same time of new project creation in Visual Studio. In that case, you really don’t need to initialize the Repo separately post your project creation and you can start working with the repository directly. You can create a new Git repository at the same time we create the new project from the New Project Dialog Window.
Start a new instance of Visual Studio

  • Launch the New Project Dialog Window by navigating from File -> New -> Project
  • Select the Project Template and provide all other required information for project creation
  • Select the “Create new Git Repository” checkbox
  • Click on OK

Create New Git Repository
And that’s it. Now we have created a new project, and it’s under a Git repository. You can now use the source code directly as your local git repository and further then push it to remote branches as needed.

Git Repo for New Project

This is a very straightforward way to connecting your solution with Git Repository. There are several other ways to enable this, but this is an overlooked feature which can make things faster and easier.

Hope this helps

Author: Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

Leave a Reply